C# Класс Loyc.MessageSinkFromDelegate

This helper class lets you implement IMessageSink with one or two delegates (a writer method, and an optional severity filter).
Наследование: IMessageSink
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

IsEnabled() публичный Метод

public IsEnabled ( Severity level ) : bool
level Severity
Результат bool

MessageSinkFromDelegate() публичный Метод

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 ().
Результат System

Write() публичный Метод

public Write ( Severity level, object context, string format ) : void
level Severity
context object
format string
Результат void

Write() публичный Метод

public Write ( Severity level, object context, string format, object arg0, object arg1 = null ) : void
level Severity
context object
format string
arg0 object
arg1 object
Результат void