C# Class Appccelerate.Formatters.FormatHelper

Provides functionality for formatting strings.
Afficher le fichier Open project: appccelerate/appccelerate

Méthodes publiques

Méthode Description
ConvertToString ( object>.IDictionary dictionary, string separator ) : string

Converts a dictionary of object, object to a string representation in the form of Key=Valueseparator.

ConvertToString ( IEnumerable collection, string separator ) : string

Converts a collection of objects to a string representation.

SecureFormat ( IFormatProvider formatProvider, string format ) : string

Replacement for the String.Format method, that throws an exception when the count of arguments does not match the count of placeholders.

If format and/or arguments are null then still a string is returned.

Tries to format with String.Format. In case of an Exception the original format string and all parameters added in a list will be returned.

Method Details

ConvertToString() public static méthode

Converts a dictionary of object, object to a string representation in the form of Key=Valueseparator.
public static ConvertToString ( object>.IDictionary dictionary, string separator ) : string
dictionary object>.IDictionary The dictionary.
separator string The separator to separate key value pairs.
Résultat string

ConvertToString() public static méthode

Converts a collection of objects to a string representation.
public static ConvertToString ( IEnumerable collection, string separator ) : string
collection IEnumerable Collection of objects.
separator string Separator to separate objects.
Résultat string

SecureFormat() public static méthode

Replacement for the String.Format method, that throws an exception when the count of arguments does not match the count of placeholders.

If format and/or arguments are null then still a string is returned.

Tries to format with String.Format. In case of an Exception the original format string and all parameters added in a list will be returned.
public static SecureFormat ( IFormatProvider formatProvider, string format ) : string
formatProvider IFormatProvider /// The format Provider. ///
format string /// The format string. ///
Résultat string