C# Класс Gu.Wpf.PropertyGrid.FormatString

Optimized this a lot to avoid caching of results.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
IsFormatString ( string format ) : bool

Checks if format has argument placeholders like 'Value: {0}'

IsValidFormatString ( string format, int numberOfArguments ) : bool

Check if format is a valid format string for numberOfArguments

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

Метод Описание
IsValidFormat ( string format, int &indexCount, bool &anyItemHasFormat ) : bool

Check a format string for errors and other properties. Does not throw nor allocate no need to cache the result as it is about as fast as a dictionary lookup for common strings.

Slice ( this text, int start, int end ) : string
TryParseFormatSuffix ( string text, int &pos, bool &itemHasFormat ) : bool
TryParseFormatSuffix ( string text, int &pos, string &result ) : bool
TryParseItemFormat ( string text, int &pos, int &index, bool &itemHasFormat ) : bool
TryParseItemFormat ( string text, int &pos, int &index, string &format ) : bool
TryParseUnsignedInt ( string text, int &pos, int &result ) : bool
TrySkipEscaped ( string text, char c, int &pos ) : bool
TrySkipTo ( string text, char c1, char c2, int &pos ) : bool
TrySkipTo ( string text, char c, int &pos ) : bool

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

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

Checks if format has argument placeholders like 'Value: {0}'
public static IsFormatString ( string format ) : bool
format string A format string.
Результат bool

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

Check if format is a valid format string for numberOfArguments
public static IsValidFormatString ( string format, int numberOfArguments ) : bool
format string The format string.
numberOfArguments int The number of format arguments.
Результат bool