C# Class Colorful.ColorStore

Stores and manages the assignment of System.Drawing.Color objects to ConsoleColor objects.
Show file Open project: tomakita/Colorful.Console Class Usage Examples

Public Methods

Method Description
ColorStore ( ConsoleColor>.ConcurrentDictionary colorMap, Color>.ConcurrentDictionary consoleColorMap ) : System

Manages the assignment of System.Drawing.Color objects to ConsoleColor objects.

RequiresUpdate ( Color color ) : bool

Notifies the caller as to whether or not the specified System.Drawing.Color needs to be added to the ColorStore.

Update ( Color newColor, ConsoleColor oldColor ) : void

Adds a new System.Drawing.Color to the ColorStore.

Method Details

ColorStore() public method

Manages the assignment of System.Drawing.Color objects to ConsoleColor objects.
public ColorStore ( ConsoleColor>.ConcurrentDictionary colorMap, Color>.ConcurrentDictionary consoleColorMap ) : System
colorMap ConsoleColor>.ConcurrentDictionary The Dictionary the ColorStore should use to key System.Drawing.Color objects /// to ConsoleColor objects.
consoleColorMap Color>.ConcurrentDictionary The Dictionary the ColorStore should use to key ConsoleColor /// objects to System.Drawing.Color objects.
return System

RequiresUpdate() public method

Notifies the caller as to whether or not the specified System.Drawing.Color needs to be added to the ColorStore.
public RequiresUpdate ( Color color ) : bool
color Color The System.Drawing.Color to be checked for membership.
return bool

Update() public method

Adds a new System.Drawing.Color to the ColorStore.
public Update ( Color newColor, ConsoleColor oldColor ) : void
newColor Color The System.Drawing.Color to be added to the ColorStore.
oldColor ConsoleColor The ConsoleColor to be replaced by the new System.Drawing.Color.
return void