C# Класс Schumix.Framework.CodeBureau.StringEnum

Helper class for working with 'extended' enums using StringValueAttribute attributes.
Показать файл Открыть проект

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

Метод Описание
GetListValues ( ) : IList

Gets the values as a 'bindable' list datasource.

GetStringValue ( Enum value ) : string

Gets a string value for a particular enum value.

GetStringValue ( string valueName ) : string

Gets the string value associated with the given enum value.

GetStringValues ( ) : Array

Gets the string values associated with the enum.

IsStringDefined ( Type enumType, string stringValue ) : bool

Return the existence of the given string value within the enum.

IsStringDefined ( Type enumType, string stringValue, bool ignoreCase ) : bool

Return the existence of the given string value within the enum.

IsStringDefined ( string stringValue ) : bool

Return the existence of the given string value within the enum.

IsStringDefined ( string stringValue, bool ignoreCase ) : bool

Return the existence of the given string value within the enum.

Parse ( Type type, string stringValue ) : object

Parses the supplied enum and string value to find an associated enum value (case sensitive).

Parse ( Type type, string stringValue, bool ignoreCase ) : object

Parses the supplied enum and string value to find an associated enum value.

StringEnum ( Type enumType ) : System

Creates a new StringEnum instance.

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

GetListValues() публичный Метод

Gets the values as a 'bindable' list datasource.
public GetListValues ( ) : IList
Результат IList

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

Gets a string value for a particular enum value.
public static GetStringValue ( Enum value ) : string
value System.Enum Value.
Результат string

GetStringValue() публичный Метод

Gets the string value associated with the given enum value.
public GetStringValue ( string valueName ) : string
valueName string Name of the enum value.
Результат string

GetStringValues() публичный Метод

Gets the string values associated with the enum.
public GetStringValues ( ) : Array
Результат System.Array

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

Return the existence of the given string value within the enum.
public static IsStringDefined ( Type enumType, string stringValue ) : bool
enumType System.Type Type of enum
stringValue string String value.
Результат bool

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

Return the existence of the given string value within the enum.
public static IsStringDefined ( Type enumType, string stringValue, bool ignoreCase ) : bool
enumType System.Type Type of enum
stringValue string String value.
ignoreCase bool Denotes whether to conduct a case-insensitive match on the supplied string value
Результат bool

IsStringDefined() публичный Метод

Return the existence of the given string value within the enum.
public IsStringDefined ( string stringValue ) : bool
stringValue string String value.
Результат bool

IsStringDefined() публичный Метод

Return the existence of the given string value within the enum.
public IsStringDefined ( string stringValue, bool ignoreCase ) : bool
stringValue string String value.
ignoreCase bool Denotes whether to conduct a case-insensitive match on the supplied string value
Результат bool

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

Parses the supplied enum and string value to find an associated enum value (case sensitive).
public static Parse ( Type type, string stringValue ) : object
type System.Type Type.
stringValue string String value.
Результат object

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

Parses the supplied enum and string value to find an associated enum value.
public static Parse ( Type type, string stringValue, bool ignoreCase ) : object
type System.Type Type.
stringValue string String value.
ignoreCase bool Denotes whether to conduct a case-insensitive match on the supplied string value
Результат object

StringEnum() публичный Метод

Creates a new StringEnum instance.
public StringEnum ( Type enumType ) : System
enumType System.Type Enum type.
Результат System