C# Класс NLog.Layouts.SimpleLayout

Наследование: Layout, ISupportsLazyParameters
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Escape ( string text ) : string

Escapes the passed text so that it can be used literally in all places where layout is normally expected without being treated as layout.

Escaping is done by replacing all occurrences of '${' with '${literal:text=${}'

Evaluate ( string text ) : string

Evaluates the specified text by expanding all layout renderers in new LogEventInfo context.

Evaluate ( string text, LogEventInfo logEvent ) : string

Evaluates the specified text by expanding all layout renderers.

SimpleLayout ( ) : System.Collections.Generic

Initializes a new instance of the SimpleLayout class.

SimpleLayout ( string txt ) : System.Collections.Generic

Initializes a new instance of the SimpleLayout class.

SimpleLayout ( string txt, ConfigurationItemFactory configurationItemFactory ) : System.Collections.Generic

Initializes a new instance of the SimpleLayout class.

ToString ( ) : string

Returns a that represents the current object.

Защищенные методы

Метод Описание
GetFormattedMessage ( LogEventInfo logEvent ) : string

Renders the layout for the specified logging event by invoking layout renderers that make up the event.

InitializeLayout ( ) : void

Initializes the layout.

Приватные методы

Метод Описание
SetRenderers ( LayoutRenderer renderers, string text ) : void
SimpleLayout ( LayoutRenderer renderers, string text, ConfigurationItemFactory configurationItemFactory ) : System.Collections.Generic

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

Escape() публичный статический Метод

Escapes the passed text so that it can be used literally in all places where layout is normally expected without being treated as layout.
Escaping is done by replacing all occurrences of '${' with '${literal:text=${}'
public static Escape ( string text ) : string
text string The text to be escaped.
Результат string

Evaluate() публичный статический Метод

Evaluates the specified text by expanding all layout renderers in new LogEventInfo context.
public static Evaluate ( string text ) : string
text string The text to be evaluated.
Результат string

Evaluate() публичный статический Метод

Evaluates the specified text by expanding all layout renderers.
public static Evaluate ( string text, LogEventInfo logEvent ) : string
text string The text to be evaluated.
logEvent LogEventInfo Log event to be used for evaluation.
Результат string

GetFormattedMessage() защищенный Метод

Renders the layout for the specified logging event by invoking layout renderers that make up the event.
protected GetFormattedMessage ( LogEventInfo logEvent ) : string
logEvent LogEventInfo The logging event.
Результат string

InitializeLayout() защищенный Метод

Initializes the layout.
protected InitializeLayout ( ) : void
Результат void

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

Initializes a new instance of the SimpleLayout class.
public SimpleLayout ( ) : System.Collections.Generic
Результат System.Collections.Generic

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

Initializes a new instance of the SimpleLayout class.
public SimpleLayout ( string txt ) : System.Collections.Generic
txt string The layout string to parse.
Результат System.Collections.Generic

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

Initializes a new instance of the SimpleLayout class.
public SimpleLayout ( string txt, ConfigurationItemFactory configurationItemFactory ) : System.Collections.Generic
txt string The layout string to parse.
configurationItemFactory NLog.Config.ConfigurationItemFactory The NLog factories to use when creating references to layout renderers.
Результат System.Collections.Generic

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

Returns a that represents the current object.
public ToString ( ) : string
Результат string