/// <summary>Sends all messages to a user-defined method.</summary> public static MessageSinkFromDelegate FromDelegate(WriteMessageFn writer, Func<Severity, bool> isEnabled = null) { return new MessageSinkFromDelegate(writer, isEnabled); }
/// <summary>Sends all messages to a user-defined method.</summary> public static MessageSinkFromDelegate FromDelegate(WriteMessageFn writer, Func <Severity, bool> isEnabled = null) { return(new MessageSinkFromDelegate(writer, isEnabled)); }
/// <summary>Initializes this object.</summary> /// <param name="writer">Required. A method that accepts output.</param> /// <param name="isEnabled">Optional. A method that decides whether to /// output based on the message type. If this parameter is provided, /// then <see cref="Write"/>() will not invoke the writer when isEnabled /// returns false. This delegate is also called by <see cref="IsEnabled"/>().</param> public MessageSinkFromDelegate(WriteMessageFn writer, Func <Severity, bool> isEnabled = null) { CheckParam.IsNotNull("writer", writer); _writer = writer; _isEnabled = isEnabled; }
/// <summary>Initializes this object.</summary> /// <param name="writer">Required. A method that accepts output.</param> /// <param name="isEnabled">Optional. A method that decides whether to /// output based on the message type. If this parameter is provided, /// then <see cref="Write"/>() will not invoke the writer when isEnabled /// returns false. This delegate is also called by <see cref="IsEnabled"/>().</param> public MessageSinkFromDelegate(WriteMessageFn writer, Func<Severity, bool> isEnabled = null) { CheckParam.IsNotNull("writer", writer); _writer = writer; _isEnabled = isEnabled; }