C# 클래스 DrutNET.StringEnum

Helper class for working with 'extended' enums using StringValueAttribute attributes.
파일 보기 프로젝트 열기: bricel/DrutNet 1 사용 예제들

공개 메소드들

메소드 설명
DisplayVal ( Enum value ) : string
GetDisplayValues ( ) : Array
GetListValues ( ) : IList

Gets the values as a 'bindable' list datasource.

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.

StrVal ( Enum value ) : string

Gets a string value for a particular enum value.

StringEnum ( Type enumType ) : System

Creates a new StringEnum instance.

메소드 상세

DisplayVal() 공개 정적인 메소드

public static DisplayVal ( Enum value ) : string
value System.Enum
리턴 string

GetDisplayValues() 공개 메소드

public GetDisplayValues ( ) : Array
리턴 System.Array

GetListValues() 공개 메소드

Gets the values as a 'bindable' list datasource.
public GetListValues ( ) : IList
리턴 IList

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

StrVal() 공개 정적인 메소드

Gets a string value for a particular enum value.
public static StrVal ( Enum value ) : string
value System.Enum Value.
리턴 string

StringEnum() 공개 메소드

Creates a new StringEnum instance.
public StringEnum ( Type enumType ) : System
enumType System.Type Enum type.
리턴 System