Enhanced C#
Language of your choice: library documentation
Properties | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected static fields | List of all members
Loyc.ConsoleMessageSink Class Reference

Sends all messages to System.Console.WriteLine(), with hard-coded colors for Error, Warning, Note, Verbose, and Detail. More...


Source file:
Inheritance diagram for Loyc.ConsoleMessageSink:
Loyc.IMessageSink< in in TSeverity, in in TContext >

Remarks

Sends all messages to System.Console.WriteLine(), with hard-coded colors for Error, Warning, Note, Verbose, and Detail.

Properties

Severity PrintSeverityAt [get, set]
 Minimum severity level at which the severity level is printed. For example, if set to Severity.Error, then the prefix "Error:" is printed for errors but the prefix "Warning:" is not printed for warnings. More...
 

Public Member Functions

void Write (Severity type, object context, string format)
 
void Write (Severity type, object context, string format, object arg0, object arg1=null)
 
void Write (Severity type, object context, string format, params object[] args)
 
bool IsEnabled (Severity type)
 Always returns true. More...
 

Static Public Member Functions

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

Protected Member Functions

virtual ConsoleColor PickColor (Severity msgType, out string msgTypeText)
 

Protected static fields

static ConsoleColor _lastColor
 

Member Function Documentation

bool Loyc.ConsoleMessageSink.IsEnabled ( Severity  type)
inline

Always returns true.

Referenced by Loyc.MessageSinkFromDelegate.MessageSinkFromDelegate().

Property Documentation

Severity Loyc.ConsoleMessageSink.PrintSeverityAt
getset

Minimum severity level at which the severity level is printed. For example, if set to Severity.Error, then the prefix "Error:" is printed for errors but the prefix "Warning:" is not printed for warnings.

Initial value: Severity.Warning