C# Class CSE.Exps.TypeExp

Used to parse type expressions
Afficher le fichier Open project: kcherr1/CSharp-Eval Class Usage Examples

Méthodes publiques

Méthode Description
CacheCommonTypes ( ) : void

Caches common types for fast lookup

GetType ( string typeData ) : Type

Converts string parameter containing type into an actual type

GetTypeObj ( object typeData ) : Type

Gets type information from object. If object is already a type, object is casted as a type and returned, if not, GetType is called.

TypeAssignMatch ( Type type, dynamic value ) : bool

Heuristic attempt to ensure value given can be coerced into type given. Useful for temporary variable assignments.

Doesn't work for most cases. Needs more work

Method Details

CacheCommonTypes() public static méthode

Caches common types for fast lookup
public static CacheCommonTypes ( ) : void
Résultat void

GetType() public static méthode

Converts string parameter containing type into an actual type
public static GetType ( string typeData ) : Type
typeData string String containing type
Résultat System.Type

GetTypeObj() public static méthode

Gets type information from object. If object is already a type, object is casted as a type and returned, if not, GetType is called.
public static GetTypeObj ( object typeData ) : Type
typeData object Object to get the type of
Résultat System.Type

TypeAssignMatch() public static méthode

Heuristic attempt to ensure value given can be coerced into type given. Useful for temporary variable assignments.
Doesn't work for most cases. Needs more work
public static TypeAssignMatch ( Type type, dynamic value ) : bool
type System.Type Type to attempt to coerce value to
value dynamic Value to coerce
Résultat bool