Namespace SharpConsoleUI.Helpers
Classes
- AnsiConsoleHelper
Provides helper methods for working with ANSI escape sequences and Spectre.Console markup in console applications.
- ColorGradient
Helper for creating and interpolating smooth color gradients. Supports predefined gradients (cool, warm, spectrum, grayscale) and custom gradients.
- ColorResolver
Provides centralized color resolution logic for controls. Extracted from 11+ controls that had identical cascading null-coalescing chains.
- ContentHelper
Provides helper methods for content layout and positioning calculations.
- ControlRenderingHelpers
Shared rendering utilities for controls to avoid code duplication. Extracted from 14 controls that had identical margin/padding rendering logic.
- FocusStateHelper
Helper class for managing focus state updates across controls. Eliminates 100% identical SetFocus boilerplate from 8+ simple controls.
- GeometryHelpers
Provides static helper methods for Rectangle geometry operations. Extracted from ConsoleWindowSystem as part of Phase 3.1 refactoring. Consolidates duplicate geometry logic from multiple classes.
- PropertySetterHelper
Helper class for property setters with validation and invalidation. Eliminates 200-250 lines of duplicated Width/Height/Color property patterns across 14+ controls.
- ScrollingHelper
Helper class for managing viewport scrolling logic across scrollable controls. Consolidates duplicated scroll adjustment code from TreeControl, ListControl, and DropdownControl.
- SelectionStateHelper
Helper class for managing selection state updates across controls. Eliminates code duplication and prevents double event firing bugs.
- SequenceHelper
Provides helper methods and constants for handling ANSI escape sequences, mouse input parsing, and keyboard input processing in console applications.
- Size
Represents a size with width and height dimensions.
- StringHelper
Provides helper methods for string manipulation operations.
- TextMeasurementCache
Caches expensive text measurement operations for improved rendering performance. Eliminates duplicate measurements during rendering cycles (40+ calls per frame in complex controls).
- TextTruncationHelper
Helper class for truncating text with ellipsis, handling Spectre.Console markup correctly. Consolidates 85% similar truncation logic from 4+ locations.
- ThreadSafeStringBuilder
Provides a thread-safe wrapper around StringBuilder for concurrent string building operations.