C# Class Loyc.MessageSinkFromDelegate

This helper class lets you implement IMessageSink with one or two delegates (a writer method, and an optional severity filter).
Inheritance: IMessageSink
Afficher le fichier Open project: qwertie/ecsharp Class Usage Examples

Méthodes publiques

Méthode Description
IsEnabled ( Severity level ) : bool
MessageSinkFromDelegate ( WriteMessageFn writer, bool>.Func isEnabled = null ) : System

Initializes this object.

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

Method Details

IsEnabled() public méthode

public IsEnabled ( Severity level ) : bool
level Severity
Résultat bool

MessageSinkFromDelegate() public méthode

Initializes this object.
public MessageSinkFromDelegate ( WriteMessageFn writer, bool>.Func isEnabled = null ) : System
writer WriteMessageFn Required. A method that accepts output.
isEnabled bool>.Func Optional. A method that decides whether to /// output based on the message type. If this parameter is provided, /// then () will not invoke the writer when isEnabled /// returns false. This delegate is also called by ().
Résultat System

Write() public méthode

public Write ( Severity level, object context, string format ) : void
level Severity
context object
format string
Résultat void

Write() public méthode

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