C# Class Schumix.Framework.CodeBureau.StringEnum

Helper class for working with 'extended' enums using StringValueAttribute attributes.
Afficher le fichier Open project: Schumix/Schumix2

Méthodes publiques

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

Method Details

GetListValues() public méthode

Gets the values as a 'bindable' list datasource.
public GetListValues ( ) : IList
Résultat IList

GetStringValue() public static méthode

Gets a string value for a particular enum value.
public static GetStringValue ( Enum value ) : string
value System.Enum Value.
Résultat string

GetStringValue() public méthode

Gets the string value associated with the given enum value.
public GetStringValue ( string valueName ) : string
valueName string Name of the enum value.
Résultat string

GetStringValues() public méthode

Gets the string values associated with the enum.
public GetStringValues ( ) : Array
Résultat System.Array

IsStringDefined() public static méthode

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

IsStringDefined() public static méthode

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
Résultat bool

IsStringDefined() public méthode

Return the existence of the given string value within the enum.
public IsStringDefined ( string stringValue ) : bool
stringValue string String value.
Résultat bool

IsStringDefined() public méthode

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
Résultat bool

Parse() public static méthode

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

Parse() public static méthode

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
Résultat object

StringEnum() public méthode

Creates a new StringEnum instance.
public StringEnum ( Type enumType ) : System
enumType System.Type Enum type.
Résultat System