|
Enhanced C#
Loyc library documentation
|
This helper class lets you implement IMessageSink with one or two delegates (a writer method, and an optional severity filter). More...
This helper class lets you implement IMessageSink with one or two delegates (a writer method, and an optional severity filter).
Public Member Functions | |
| MessageSinkFromDelegate (WriteMessageFn< TContext > writer, Func< Severity, bool >?isEnabled=null) | |
| Initializes this object. More... | |
| void | Write (Severity level, TContext context, string format) |
| Writes a message to the target that this object represents. More... | |
| void | Write (Severity level, TContext context, string format, object?arg0, object?arg1=null) |
| void | Write (Severity level, TContext context, string format, params object?[] args) |
| bool | IsEnabled (Severity level) |
| Returns true if messages of the specified type will actually be printed, or false if Write(type, ...) has no effect. More... | |
|
inline |
Initializes this object.
|
inline |
Returns true if messages of the specified type will actually be printed, or false if Write(type, ...) has no effect.
Implements Loyc.IMessageSink< in TContext >.
|
inline |
Writes a message to the target that this object represents.
| level | 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.ContextToString(). |
| format | A message to display. If there are additional arguments, placeholders such as {0} and {1} refer to these arguments. |
Implements Loyc.IMessageSink< in TContext >.
1.8.7