CellDecoratorHelpers Class
Definition
Section titled “Definition”Helpers for CellDecorator and Decorators which manages null on the property.
public static class CellDecoratorHelpersInheritance object
Properties
Section titled “Properties”The list pool used for creating the decorator lists applied to cells.
public static IListPool<CellDecorator> Pool { get; set; }Methods
Section titled “Methods”SetDecorators(IEnumerable<CellDecorator>?, ColoredGlyphBase)
Section titled “SetDecorators(IEnumerable<CellDecorator>?, ColoredGlyphBase)”Replaces the decorators of a glyph.
public static void SetDecorators(IEnumerable<CellDecorator>? decorators, ColoredGlyphBase glyph)Parameters
Section titled “Parameters”decorators IEnumerable<CellDecorator>
The decorators to set. null clears the decorators.
glyph ColoredGlyphBase
The glyph to alter.
SetDecorator(CellDecorator, ColoredGlyphBase)
Section titled “SetDecorator(CellDecorator, ColoredGlyphBase)”Replaces the decorators of a glyph with a single decorator.
public static void SetDecorator(CellDecorator decorator, ColoredGlyphBase glyph)Parameters
Section titled “Parameters”decorator CellDecorator
The decorator to set.
glyph ColoredGlyphBase
The glyph to alter.
AddDecorators(IEnumerable<CellDecorator>?, ColoredGlyphBase)
Section titled “AddDecorators(IEnumerable<CellDecorator>?, ColoredGlyphBase)”Adds the decorators to a glyph.
public static void AddDecorators(IEnumerable<CellDecorator>? decorators, ColoredGlyphBase glyph)Parameters
Section titled “Parameters”decorators IEnumerable<CellDecorator>
The decorators to add. Duplicates are skipped.
glyph ColoredGlyphBase
The glyph to alter.
AddDecorator(CellDecorator, ColoredGlyphBase)
Section titled “AddDecorator(CellDecorator, ColoredGlyphBase)”Adds the specified decorator to a glyph.
public static void AddDecorator(CellDecorator decorator, ColoredGlyphBase glyph)Parameters
Section titled “Parameters”decorator CellDecorator
The decorator to add.
glyph ColoredGlyphBase
The glyph to alter.
RemoveDecorators(IEnumerable<CellDecorator>, ColoredGlyphBase)
Section titled “RemoveDecorators(IEnumerable<CellDecorator>, ColoredGlyphBase)”Removes the specified decorators from a glyph. If no decorators remain on the glyph, the Decorators collection is set to null.
public static void RemoveDecorators(IEnumerable<CellDecorator> decorators, ColoredGlyphBase glyph)Parameters
Section titled “Parameters”decorators IEnumerable<CellDecorator>
The decorators to remove.
glyph ColoredGlyphBase
The glyph to alter.
RemoveAllDecorators(ColoredGlyphBase)
Section titled “RemoveAllDecorators(ColoredGlyphBase)”Removes all decorators from a glyph, returns the list to the pool, and sets the Decorators collection to null.
public static void RemoveAllDecorators(ColoredGlyphBase glyph)Parameters
Section titled “Parameters”glyph ColoredGlyphBase
The glyph to alter.
RemoveDecorator(CellDecorator, ColoredGlyphBase)
Section titled “RemoveDecorator(CellDecorator, ColoredGlyphBase)”Removes the specified decorator from a glyph. If no decorators remain on the glyph, the Decorators collection is set to null.
public static void RemoveDecorator(CellDecorator decorator, ColoredGlyphBase glyph)Parameters
Section titled “Parameters”decorator CellDecorator
The decorator to remove.
glyph ColoredGlyphBase
The glyph to alter.
CloneDecorators(ColoredGlyphBase)
Section titled “CloneDecorators(ColoredGlyphBase)”Returns a new list of decorators from the Decorators property of glyph.
public static List<CellDecorator>? CloneDecorators(ColoredGlyphBase glyph)Parameters
Section titled “Parameters”glyph ColoredGlyphBase
The glyph to copy the decorators from.
Returns
Section titled “Returns”List<CellDecorator>
A list with all of the decorators from glyph. If the glyph’s decorators are null, null is returned.
ItemsMatch(List<CellDecorator>?, List<CellDecorator>?)
Section titled “ItemsMatch(List<CellDecorator>?, List<CellDecorator>?)”Determines whether the contents of two CellDecorator arrays are equal.
public static bool ItemsMatch(this List<CellDecorator>? self, List<CellDecorator>? other)Parameters
Section titled “Parameters”self List<CellDecorator>
The first object to compare.
other List<CellDecorator>
The second object to compare.
Returns
Section titled “Returns”bool
A boolean value to indicate whether or not the two arrays are considered equal.