C# Класс StringFormat.TokenStringFormat

The primary class for accessing the functionality of the StringFormat library.
Показать файл Открыть проект

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

Метод Описание
Format ( IFormatProvider provider, string format, object>.IDictionary values ) : string

Formats the string using the placeholder for the property names.

Format ( IFormatProvider provider, string format, object values ) : string

Formats the string using the placeholder for the property names.

Format ( string format, object>.IDictionary values ) : string

Formats the string using the placeholder for the property names.

Format ( string format, object values ) : string

Formats the string using the placeholder for the property names.

TokenizeString ( string format ) : string

Returns the format string with the tokens replaced as ordinals. Exposed for developer benefit. Most likely used only in debugging.

TokenizeString ( string format, IEnumerable &tokens ) : string

Returns the format string with the tokens replaced as ordinals. Exposed for developer benefit. Most likely used only in debugging.

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

Метод Описание
AnonymousObjectToDictionary ( object values ) : object>.IDictionary
BuildNewToken ( string fullToken, string name, int index ) : string
IndexOfName ( IList names, string name ) : int
ParseName ( string fullToken ) : string

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

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

Formats the string using the placeholder for the property names.
public static Format ( IFormatProvider provider, string format, object>.IDictionary values ) : string
provider IFormatProvider The provider to use for formatting dates and numeric values.
format string The string to format.
values object>.IDictionary The dictionary to pull the values from.
Результат string

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

Formats the string using the placeholder for the property names.
public static Format ( IFormatProvider provider, string format, object values ) : string
provider IFormatProvider The provider to use for formatting dates and numeric values.
format string The string to format.
values object The object to pull the values from. Usually an anonymous type.
Результат string

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

Formats the string using the placeholder for the property names.
public static Format ( string format, object>.IDictionary values ) : string
format string The string to format.
values object>.IDictionary The dictionary to pull the values from.
Результат string

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

Formats the string using the placeholder for the property names.
public static Format ( string format, object values ) : string
format string The string to format.
values object The object to pull the values from. Usually an anonymous type.
Результат string

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

Returns the format string with the tokens replaced as ordinals. Exposed for developer benefit. Most likely used only in debugging.
public static TokenizeString ( string format ) : string
format string The string to format.
Результат string

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

Returns the format string with the tokens replaced as ordinals. Exposed for developer benefit. Most likely used only in debugging.
public static TokenizeString ( string format, IEnumerable &tokens ) : string
format string The string to format.
tokens IEnumerable The tokens that were extracted from the format string.
Результат string