C# Class StringFormat.TokenStringFormat

The primary class for accessing the functionality of the StringFormat library.
Afficher le fichier Open project: little-sharps/string_format

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
AnonymousObjectToDictionary ( object values ) : object>.IDictionary
BuildNewToken ( string fullToken, string name, int index ) : string
IndexOfName ( IList names, string name ) : int
ParseName ( string fullToken ) : string

Method Details

Format() public static méthode

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.
Résultat string

Format() public static méthode

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.
Résultat string

Format() public static méthode

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.
Résultat string

Format() public static méthode

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.
Résultat string

TokenizeString() public static méthode

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.
Résultat string

TokenizeString() public static méthode

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.
Résultat string