C# Класс CSE.Exps.TypeExp

Used to parse type expressions
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

CacheCommonTypes() публичный статический Метод

Caches common types for fast lookup
public static CacheCommonTypes ( ) : void
Результат void

GetType() публичный статический Метод

Converts string parameter containing type into an actual type
public static GetType ( string typeData ) : Type
typeData string String containing type
Результат System.Type

GetTypeObj() публичный статический Метод

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
Результат System.Type

TypeAssignMatch() публичный статический Метод

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
Результат bool