C# Класс Serilog.Parsing.PropertyToken

A message template token representing a log event property.
Наследование: MessageTemplateToken
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Equals ( object obj ) : bool

Determines whether the specified T:System.Object is equal to the current T:System.Object.

GetHashCode ( ) : int

Serves as a hash function for a particular type.

PropertyToken ( string propertyName, string rawText, string format = null, Alignment alignment = null, Destructuring destructuring = Destructuring.Default, int startIndex = -1 ) : System

Construct a PropertyToken.

Render ( LogEventPropertyValue>.IReadOnlyDictionary properties, TextWriter output, IFormatProvider formatProvider = null ) : void

Render the token to the output.

ToString ( ) : string

Returns a string that represents the current object.

TryGetPositionalValue ( int &position ) : bool

Try to get the integer value represented by the property name.

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

Метод Описание
PropertyToken ( string propertyName, string rawText, string formatObsolete, Destructuring destructuringObsolete ) : System

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

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

Determines whether the specified T:System.Object is equal to the current T:System.Object.
public Equals ( object obj ) : bool
obj object The object to compare with the current object.
Результат bool

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

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
Результат int

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

Construct a PropertyToken.
public PropertyToken ( string propertyName, string rawText, string format = null, Alignment alignment = null, Destructuring destructuring = Destructuring.Default, int startIndex = -1 ) : System
propertyName string The name of the property.
rawText string The token as it appears in the message template.
format string The format applied to the property, if any.
alignment Alignment The alignment applied to the property, if any.
destructuring Destructuring The destructuring strategy applied to the property, if any.
startIndex int The token's start index in the template.
Результат System

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

Render the token to the output.
public Render ( LogEventPropertyValue>.IReadOnlyDictionary properties, TextWriter output, IFormatProvider formatProvider = null ) : void
properties LogEventPropertyValue>.IReadOnlyDictionary Properties that may be represented by the token.
output TextWriter Output for the rendered string.
formatProvider IFormatProvider Supplies culture-specific formatting information, or null.
Результат void

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

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

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

Try to get the integer value represented by the property name.
public TryGetPositionalValue ( int &position ) : bool
position int The integer value, if present.
Результат bool