C# 클래스 Spring.Objects.Factory.Config.VariableAccessor

Provides methods for type-safe accessing IVariableSources.
파일 보기 프로젝트 열기: spring-projects/spring-net 1 사용 예제들

공개 메소드들

메소드 설명
GetBoolean ( string name, bool defaultValue ) : bool

Returns a bool that contains the value of the specified variable.

GetBoolean ( string name, bool defaultValue, bool throwOnInvalidValue ) : bool

Returns a bool that contains the value of the specified variable.

GetByte ( string name, byte defaultValue ) : byte

Returns a byte that contains the value of the specified variable.

GetByte ( string name, byte defaultValue, bool throwOnInvalidValue ) : byte

Returns a byte that contains the value of the specified variable.

GetChar ( string name, char defaultValue ) : char

Returns a char that contains the value of the specified variable.

GetChar ( string name, char defaultValue, bool throwOnInvalidValue ) : char

Returns a char that contains the value of the specified variable.

GetDateTime ( string name, string format, System.DateTime defaultValue ) : System.DateTime

Returns a DateTime that contains the value of the specified variable.

GetDateTime ( string name, string format, System.DateTime defaultValue, bool throwOnInvalidValue ) : System.DateTime

Returns a DateTime that contains the value of the specified variable.

GetDecimal ( string name, decimal defaultValue ) : decimal

Returns a decimal that contains the value of the specified variable.

GetDecimal ( string name, decimal defaultValue, bool throwOnInvalidValue ) : decimal

Returns a decimal that contains the value of the specified variable.

GetDouble ( string name, double defaultValue ) : double

Returns a double that contains the value of the specified variable.

GetDouble ( string name, double defaultValue, bool throwOnInvalidValue ) : double

Returns a double that contains the value of the specified variable.

GetEnum ( string name, Enum defaultValue ) : Enum

Returns an Enum of defaultValue's type that contains the value of the specified variable.

GetEnum ( string name, Enum defaultValue, bool throwOnInvalidValue ) : Enum

Returns an Enum of defaultValue's type that contains the value of the specified variable.

GetFloat ( string name, float defaultValue ) : float

Returns a float that contains the value of the specified variable.

GetFloat ( string name, float defaultValue, bool throwOnInvalidValue ) : float

Returns a float that contains the value of the specified variable.

GetGuid ( string name, System.Guid defaultValue ) : System.Guid

Returns a Guid that contains the value of the specified variable.

GetGuid ( string name, System.Guid defaultValue, bool throwOnInvalidValue ) : System.Guid

Returns a Guid that contains the value of the specified variable.

GetInt16 ( string name, short defaultValue ) : short

Returns a short that contains the value of the specified variable.

GetInt16 ( string name, short defaultValue, bool throwOnInvalidValue ) : short

Returns a short that contains the value of the specified variable.

GetInt32 ( string name, int defaultValue ) : int

Returns a int that contains the value of the specified variable.

GetInt32 ( string name, int defaultValue, bool throwOnInvalidValue ) : int

Returns a int that contains the value of the specified variable.

GetInt64 ( string name, long defaultValue ) : long

Returns a long that contains the value of the specified variable.

GetInt64 ( string name, long defaultValue, bool throwOnInvalidValue ) : long

Returns a long that contains the value of the specified variable.

GetString ( string name, string defaultValue ) : string

Returns a string that contains the value of the specified variable.

VariableAccessor ( IVariableSource variableSource ) : System

Initialize a new instance of an VariableAccessor

비공개 메소드들

메소드 설명
GetUInt16 ( string name, ushort defaultValue ) : ushort
GetUInt16 ( string name, ushort defaultValue, bool throwOnInvalidValue ) : ushort
GetUInt32 ( string name, uint defaultValue ) : uint
GetUInt32 ( string name, uint defaultValue, bool throwOnInvalidValue ) : uint
GetUInt64 ( string name, ulong defaultValue ) : ulong
GetUInt64 ( string name, ulong defaultValue, bool throwOnInvalidValue ) : ulong

메소드 상세

GetBoolean() 공개 메소드

Returns a bool that contains the value of the specified variable.
public GetBoolean ( string name, bool defaultValue ) : bool
name string The name of the variable to be read.
defaultValue bool The value to be returned if returns null.
리턴 bool

GetBoolean() 공개 메소드

Returns a bool that contains the value of the specified variable.
public GetBoolean ( string name, bool defaultValue, bool throwOnInvalidValue ) : bool
name string The name of the variable to be read.
defaultValue bool The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 bool

GetByte() 공개 메소드

Returns a byte that contains the value of the specified variable.
public GetByte ( string name, byte defaultValue ) : byte
name string The name of the variable to be read.
defaultValue byte The value to be returned if returns null.
리턴 byte

GetByte() 공개 메소드

Returns a byte that contains the value of the specified variable.
public GetByte ( string name, byte defaultValue, bool throwOnInvalidValue ) : byte
name string The name of the variable to be read.
defaultValue byte The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 byte

GetChar() 공개 메소드

Returns a char that contains the value of the specified variable.
public GetChar ( string name, char defaultValue ) : char
name string The name of the variable to be read.
defaultValue char The value to be returned if returns null.
리턴 char

GetChar() 공개 메소드

Returns a char that contains the value of the specified variable.
public GetChar ( string name, char defaultValue, bool throwOnInvalidValue ) : char
name string The name of the variable to be read.
defaultValue char The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 char

GetDateTime() 공개 메소드

Returns a DateTime that contains the value of the specified variable.
public GetDateTime ( string name, string format, System.DateTime defaultValue ) : System.DateTime
name string The name of the variable to be read.
format string The expected format of the variable's value
defaultValue System.DateTime The value to be returned if returns null.
리턴 System.DateTime

GetDateTime() 공개 메소드

Returns a DateTime that contains the value of the specified variable.
public GetDateTime ( string name, string format, System.DateTime defaultValue, bool throwOnInvalidValue ) : System.DateTime
name string The name of the variable to be read.
format string The expected format of the variable's value
defaultValue System.DateTime The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 System.DateTime

GetDecimal() 공개 메소드

Returns a decimal that contains the value of the specified variable.
public GetDecimal ( string name, decimal defaultValue ) : decimal
name string The name of the variable to be read.
defaultValue decimal The value to be returned if returns null.
리턴 decimal

GetDecimal() 공개 메소드

Returns a decimal that contains the value of the specified variable.
public GetDecimal ( string name, decimal defaultValue, bool throwOnInvalidValue ) : decimal
name string The name of the variable to be read.
defaultValue decimal The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 decimal

GetDouble() 공개 메소드

Returns a double that contains the value of the specified variable.
public GetDouble ( string name, double defaultValue ) : double
name string The name of the variable to be read.
defaultValue double The value to be returned if returns null.
리턴 double

GetDouble() 공개 메소드

Returns a double that contains the value of the specified variable.
public GetDouble ( string name, double defaultValue, bool throwOnInvalidValue ) : double
name string The name of the variable to be read.
defaultValue double The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 double

GetEnum() 공개 메소드

Returns an Enum of defaultValue's type that contains the value of the specified variable.
public GetEnum ( string name, Enum defaultValue ) : Enum
name string The name of the variable to be read.
defaultValue System.Enum The value to be returned if returns null.
리턴 System.Enum

GetEnum() 공개 메소드

Returns an Enum of defaultValue's type that contains the value of the specified variable.
public GetEnum ( string name, Enum defaultValue, bool throwOnInvalidValue ) : Enum
name string The name of the variable to be read.
defaultValue System.Enum The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 System.Enum

GetFloat() 공개 메소드

Returns a float that contains the value of the specified variable.
public GetFloat ( string name, float defaultValue ) : float
name string The name of the variable to be read.
defaultValue float The value to be returned if returns null.
리턴 float

GetFloat() 공개 메소드

Returns a float that contains the value of the specified variable.
public GetFloat ( string name, float defaultValue, bool throwOnInvalidValue ) : float
name string The name of the variable to be read.
defaultValue float The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 float

GetGuid() 공개 메소드

Returns a Guid that contains the value of the specified variable.
public GetGuid ( string name, System.Guid defaultValue ) : System.Guid
name string The name of the variable to be read.
defaultValue System.Guid The value to be returned if returns null.
리턴 System.Guid

GetGuid() 공개 메소드

Returns a Guid that contains the value of the specified variable.
public GetGuid ( string name, System.Guid defaultValue, bool throwOnInvalidValue ) : System.Guid
name string The name of the variable to be read.
defaultValue System.Guid The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 System.Guid

GetInt16() 공개 메소드

Returns a short that contains the value of the specified variable.
public GetInt16 ( string name, short defaultValue ) : short
name string The name of the variable to be read.
defaultValue short The value to be returned if returns null.
리턴 short

GetInt16() 공개 메소드

Returns a short that contains the value of the specified variable.
public GetInt16 ( string name, short defaultValue, bool throwOnInvalidValue ) : short
name string The name of the variable to be read.
defaultValue short The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 short

GetInt32() 공개 메소드

Returns a int that contains the value of the specified variable.
public GetInt32 ( string name, int defaultValue ) : int
name string The name of the variable to be read.
defaultValue int The value to be returned if returns null.
리턴 int

GetInt32() 공개 메소드

Returns a int that contains the value of the specified variable.
public GetInt32 ( string name, int defaultValue, bool throwOnInvalidValue ) : int
name string The name of the variable to be read.
defaultValue int The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 int

GetInt64() 공개 메소드

Returns a long that contains the value of the specified variable.
public GetInt64 ( string name, long defaultValue ) : long
name string The name of the variable to be read.
defaultValue long The value to be returned if returns null.
리턴 long

GetInt64() 공개 메소드

Returns a long that contains the value of the specified variable.
public GetInt64 ( string name, long defaultValue, bool throwOnInvalidValue ) : long
name string The name of the variable to be read.
defaultValue long The value to be returned if returns null.
throwOnInvalidValue bool /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead.
리턴 long

GetString() 공개 메소드

Returns a string that contains the value of the specified variable.
public GetString ( string name, string defaultValue ) : string
name string The name of the variable to be read.
defaultValue string The value to be returned if returns or .
리턴 string

VariableAccessor() 공개 메소드

Initialize a new instance of an VariableAccessor
public VariableAccessor ( IVariableSource variableSource ) : System
variableSource IVariableSource The underlying to read values from.
리턴 System