C# Class Loyc.ConsoleMessageSink

Sends all messages to System.Console.WriteLine(), with hard-coded colors for Error, Warning, Note, Verbose, and Detail.
Inheritance: IMessageSink
显示文件 Open project: qwertie/ecsharp

Public Properties

Property Type Description
Value ConsoleMessageSink

Protected Properties

Property Type Description
_lastColor ConsoleColor

Public Methods

Method Description
ConsoleMessageSink ( ) : System
IsEnabled ( Severity level ) : bool

Always returns true.

Write ( Severity level, object context, string format ) : void
Write ( Severity level, object context, string format, object arg0, object arg1 = null ) : void
WriteColoredMessage ( ConsoleColor color, object context, string text ) : void

Protected Methods

Method Description
PickColor ( Severity level, string &levelText ) : ConsoleColor

Private Methods

Method Description
WriteCore ( Severity level, object context, string text ) : void

Method Details

ConsoleMessageSink() public method

public ConsoleMessageSink ( ) : System
return System

IsEnabled() public method

Always returns true.
public IsEnabled ( Severity level ) : bool
level Severity
return bool

PickColor() protected method

protected PickColor ( Severity level, string &levelText ) : ConsoleColor
level Severity
levelText string
return ConsoleColor

Write() public method

public Write ( Severity level, object context, string format ) : void
level Severity
context object
format string
return void

Write() public method

public Write ( Severity level, object context, string format, object arg0, object arg1 = null ) : void
level Severity
context object
format string
arg0 object
arg1 object
return void

WriteColoredMessage() public static method

public static WriteColoredMessage ( ConsoleColor color, object context, string text ) : void
color ConsoleColor
context object
text string
return void

Property Details

Value public_oe static_oe property

public static ConsoleMessageSink,Loyc Value
return ConsoleMessageSink

_lastColor protected_oe static_oe property

protected static ConsoleColor _lastColor
return ConsoleColor