C# Класс Appccelerate.Formatters.FormatHelper

Provides functionality for formatting strings.
Показать файл Открыть проект

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

Метод Описание
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.

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

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

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.
Результат string

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

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.
Результат string

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

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. ///
Результат string