NLog.LogEventInfo.CreateNullEvent C# (CSharp) Method

CreateNullEvent() public static method

Creates the null event.
public static CreateNullEvent ( ) : LogEventInfo
return LogEventInfo
        public static LogEventInfo CreateNullEvent()
        {
            return new LogEventInfo(LogLevel.Off, string.Empty, string.Empty);
        }

Usage Example

Esempio n. 1
0
 /// <summary>
 /// Evaluates the specified text by expadinging all layout renderers
 /// in new <see cref="LogEventInfo" /> context.
 /// </summary>
 /// <param name="text">The text to be evaluated.</param>
 /// <returns>The input text with all occurences of ${} replaced with
 /// values provided by the appropriate layout renderers.</returns>
 public static string Evaluate(string text)
 {
     return(Evaluate(text, LogEventInfo.CreateNullEvent()));
 }