C# Class FluentValidation.Internal.MessageFormatter

Assists in the construction of validation messages.
Exibir arquivo Open project: JeremySkinner/FluentValidation Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
GetPlaceholder ( string key ) : string
ReplacePlaceholderWithValue ( string template, string key, object value ) : string

Method Details

AppendAdditionalArguments() public method

Adds additional arguments to the message for use with standard string placeholders.
public AppendAdditionalArguments ( ) : MessageFormatter
return MessageFormatter

AppendArgument() public method

Adds a value for a validation message placeholder.
public AppendArgument ( string name, object value ) : MessageFormatter
name string
value object
return MessageFormatter

AppendPropertyName() public method

Appends a property name to the message.
public AppendPropertyName ( string name ) : MessageFormatter
name string The name of the property
return MessageFormatter

AppendPropertyValue() public method

Appends a property value to the message.
public AppendPropertyValue ( object value ) : MessageFormatter
value object The value of the property
return MessageFormatter

BuildMessage() public method

Constructs the final message from the specified template.
public BuildMessage ( string messageTemplate ) : string
messageTemplate string Message template
return string