C# 클래스 Uiml.Rendering.TypeDecoding.TypeDecoder

Class to convert between different types, amongst others to convert (typeless) data values from the UIML document to the types required by the specific toolkit (e.g. '255,0,0' to an instance of System.Drawing.Color).
Implements the Singleton pattern. http://msdn2.microsoft.com/en-us/library/ms954629.aspx
상속: ITypeDecoder
파일 보기 프로젝트 열기: jozilla/Uiml.net

공개 프로퍼티들

프로퍼티 타입 설명
Instance TypeDecoder
PARSE string
SYSTEM_CONVERT_TYPES List

보호된 프로퍼티들

프로퍼티 타입 설명
m_registry TypeDecoderRegistry

공개 메소드들

메소드 설명
GetArg ( object o, Type t ) : object
GetArgs ( System.Property p, Type types ) : object[]
GetMultipleArgs ( System.Property p, Type types ) : object[]

Given an array of properties and an array of types, this method will create an array of objects by converting each property value (p[i].Value) into its appropriate type according to the Type array (types[i]).

HasDecoder ( Type from, Type to ) : bool

Checks whether a decoder exists for a certain signature.

HasDecoder ( Type from, Type to, bool deep ) : bool

Checks whether a decoder exists for a certain signature.

HasDecoder ( string from, string to ) : bool

Checks whether a decoder exists for a certain signature.

HasDecoder ( string from, string to, bool deep ) : bool

Checks whether a decoder exists for a certain signature.

Register ( Assembly a ) : void
Register ( MethodInfo method ) : void

Register a new function for type decoding. The from and to types are automatically extracted.

Register ( Type t ) : void

보호된 메소드들

메소드 설명
ConvertComplex ( Type t, System.Property p ) : object

Helper function to convert a property to a complex type.

ConvertComplex ( Type t, object oValue ) : object

Utility function to convert an arbitrary object to a complex type.

ConvertPrimitive ( Type t, System.Property p ) : object

Helper function to convert a property's value to a primitive type (e.g. char, int, float, ...).

ConvertPrimitive ( Type t, System oValue ) : object

Utility function to convert an arbitrary object to a primitive type using the object's Parse method (like the one in System.String).

SystemConvert ( Type t, object o ) : object

비공개 메소드들

메소드 설명
TypeDecoder ( ) : Uiml.Utils.Reflection

메소드 상세

ConvertComplex() 보호된 메소드

Helper function to convert a property to a complex type.
protected ConvertComplex ( Type t, System.Property p ) : object
t System.Type
p System.Property
리턴 object

ConvertComplex() 보호된 메소드

Utility function to convert an arbitrary object to a complex type.
protected ConvertComplex ( Type t, object oValue ) : object
t System.Type
oValue object
리턴 object

ConvertPrimitive() 보호된 메소드

Helper function to convert a property's value to a primitive type (e.g. char, int, float, ...).
protected ConvertPrimitive ( Type t, System.Property p ) : object
t System.Type
p System.Property
리턴 object

ConvertPrimitive() 보호된 메소드

Utility function to convert an arbitrary object to a primitive type using the object's Parse method (like the one in System.String).
protected ConvertPrimitive ( Type t, System oValue ) : object
t System.Type
oValue System
리턴 object

GetArg() 공개 메소드

public GetArg ( object o, Type t ) : object
o object
t System.Type
리턴 object

GetArgs() 공개 메소드

public GetArgs ( System.Property p, Type types ) : object[]
p System.Property
types System.Type
리턴 object[]

GetMultipleArgs() 공개 메소드

Given an array of properties and an array of types, this method will create an array of objects by converting each property value (p[i].Value) into its appropriate type according to the Type array (types[i]).
public GetMultipleArgs ( System.Property p, Type types ) : object[]
p System.Property
types System.Type
리턴 object[]

HasDecoder() 공개 메소드

Checks whether a decoder exists for a certain signature.
public HasDecoder ( Type from, Type to ) : bool
from System.Type The type that we want to decode from
to System.Type The type that we want to decode to
리턴 bool

HasDecoder() 공개 메소드

Checks whether a decoder exists for a certain signature.
public HasDecoder ( Type from, Type to, bool deep ) : bool
from System.Type The type that we want to decode from
to System.Type The type that we want to decode to
deep bool If true, specifies that we want to include indirect type decoders (e.g. types A->C through A->B and B->C)
리턴 bool

HasDecoder() 공개 메소드

Checks whether a decoder exists for a certain signature.
public HasDecoder ( string from, string to ) : bool
from string The name of the type that we want to decode from
to string The name of the type that we want to decode to
리턴 bool

HasDecoder() 공개 메소드

Checks whether a decoder exists for a certain signature.
public HasDecoder ( string from, string to, bool deep ) : bool
from string The name of the type that we want to decode from
to string The name of the type that we want to decode to
deep bool If true, specifies that we want to include indirect type decoders (e.g. types A->C through A->B and B->C)
리턴 bool

Register() 공개 메소드

public Register ( Assembly a ) : void
a System.Reflection.Assembly
리턴 void

Register() 공개 메소드

Register a new function for type decoding. The from and to types are automatically extracted.
/// Thrown when method does not have exactly one /// argument and a non-void return type. ///
public Register ( MethodInfo method ) : void
method System.Reflection.MethodInfo /// The function we want to register as a type decoder. ///
리턴 void

Register() 공개 메소드

public Register ( Type t ) : void
t System.Type
리턴 void

SystemConvert() 보호된 메소드

protected SystemConvert ( Type t, object o ) : object
t System.Type
o object
리턴 object

프로퍼티 상세

Instance 공개적으로 정적으로 프로퍼티

public static TypeDecoder,Uiml.Rendering.TypeDecoding Instance
리턴 TypeDecoder

PARSE 공개적으로 정적으로 프로퍼티

public static string PARSE
리턴 string

SYSTEM_CONVERT_TYPES 공개적으로 정적으로 프로퍼티

public static List SYSTEM_CONVERT_TYPES
리턴 List

m_registry 보호되어 있는 프로퍼티

protected TypeDecoderRegistry m_registry
리턴 TypeDecoderRegistry