Enhanced C#
Language of your choice: library documentation
|
Sends all messages to System.Console.WriteLine(), with hard-coded colors for Error, Warning, Note, Verbose, and Detail. More...
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) |
Writes a message to the target that this object represents. More... | |
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 |
|
inline |
Always returns true.
Implements Loyc.IMessageSink.
Writes a message to the target that this object represents.
type | Severity or importance of the message; widely-used types include Error, Warning, Note, Debug, and Verbose. The special type Detail is intended to provide more information about a previous message. |
context | An object that the message is related to, or that represents the location that the message applies to. The message sink may try to convert this object to a string and include it in its output. See also MessageSink.LocationString(). |
format | A message to display. If there are additional arguments, placeholders such as {0} and {1} refer to these arguments. |
Implements Loyc.IMessageSink.
|
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.