C# Класс FluentValidation.Internal.MessageFormatter

Assists in the construction of validation messages.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AppendAdditionalArguments ( ) : MessageFormatter

Adds additional arguments to the message for use with standard string placeholders.

AppendArgument ( string name, object value ) : MessageFormatter

Adds a value for a validation message placeholder.

AppendPropertyName ( string name ) : MessageFormatter

Appends a property name to the message.

AppendPropertyValue ( object value ) : MessageFormatter

Appends a property value to the message.

BuildMessage ( string messageTemplate ) : string

Constructs the final message from the specified template.

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

Метод Описание
GetPlaceholder ( string key ) : string
ReplacePlaceholderWithValue ( string template, string key, object value ) : string

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

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

Adds additional arguments to the message for use with standard string placeholders.
public AppendAdditionalArguments ( ) : MessageFormatter
Результат MessageFormatter

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

Adds a value for a validation message placeholder.
public AppendArgument ( string name, object value ) : MessageFormatter
name string
value object
Результат MessageFormatter

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

Appends a property name to the message.
public AppendPropertyName ( string name ) : MessageFormatter
name string The name of the property
Результат MessageFormatter

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

Appends a property value to the message.
public AppendPropertyValue ( object value ) : MessageFormatter
value object The value of the property
Результат MessageFormatter

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

Constructs the final message from the specified template.
public BuildMessage ( string messageTemplate ) : string
messageTemplate string Message template
Результат string