C# Класс Monobjc.Utils.TypeHelper

Utility class to manipulate Type instance and arrays.
Показать файл Открыть проект

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

Метод Описание
GetNativeParameterTypes ( MethodBase methodBase, bool is64bits ) : System.Type[]

Get the native conterpart of the method parameter types.

GetNativeParameterTypes ( Type parameterTypes, bool is64bits ) : System.Type[]

Get the native conterpart of the given types.

GetNativeType ( Type type, bool is64bits ) : Type

Get the native conterpart of the given type.

GetParameterNames ( MethodBase methodBase ) : string[]

Extract the parameter names for the method.

GetParameterTypes ( MethodBase methodBase ) : System.Type[]

Extract the parameter types for the method.

NeedWrapping ( Type type ) : bool

Tells if the given type need to be wrapped as a native pointer.

ToDouble ( float value ) : double
ToInt32 ( float value ) : int
ToInt32 ( long value ) : int
ToInt64 ( float value ) : long
ToInt64 ( int value ) : long
ToSingle ( double value ) : float
ToSingle ( int value ) : float
ToSingle ( long value ) : float
ToSingle ( uint value ) : float
ToSingle ( ulong value ) : float
ToUInt32 ( float value ) : uint
ToUInt32 ( ulong value ) : uint
ToUInt64 ( float value ) : ulong
ToUInt64 ( uint value ) : ulong

Приватные методы

Метод Описание
GetConverter ( Type sourceType, Type targetType ) : MethodInfo

Gets the converter between the source and destination type.

GetConverterHandle ( Type sourceType, Type targetType ) : IntPtr

Gets the converter between the source and destination type.

GetUnderlyingType ( Type type, bool is64bits ) : Type

Gets the underlying native type of the managed type.

GetUnderlyingTypeHandle ( Type type, bool is64bits ) : IntPtr

Gets the underlying native type of the managed type.

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

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

Get the native conterpart of the method parameter types.
public static GetNativeParameterTypes ( MethodBase methodBase, bool is64bits ) : System.Type[]
methodBase System.Reflection.MethodBase
is64bits bool
Результат System.Type[]

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

Get the native conterpart of the given types.
public static GetNativeParameterTypes ( Type parameterTypes, bool is64bits ) : System.Type[]
parameterTypes System.Type
is64bits bool
Результат System.Type[]

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

Get the native conterpart of the given type.
public static GetNativeType ( Type type, bool is64bits ) : Type
type System.Type
is64bits bool
Результат System.Type

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

Extract the parameter names for the method.
public static GetParameterNames ( MethodBase methodBase ) : string[]
methodBase System.Reflection.MethodBase
Результат string[]

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

Extract the parameter types for the method.
public static GetParameterTypes ( MethodBase methodBase ) : System.Type[]
methodBase System.Reflection.MethodBase
Результат System.Type[]

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

Tells if the given type need to be wrapped as a native pointer.
public static NeedWrapping ( Type type ) : bool
type System.Type
Результат bool

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

public static ToDouble ( float value ) : double
value float
Результат double

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

public static ToInt32 ( float value ) : int
value float
Результат int

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

public static ToInt32 ( long value ) : int
value long
Результат int

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

public static ToInt64 ( float value ) : long
value float
Результат long

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

public static ToInt64 ( int value ) : long
value int
Результат long

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

public static ToSingle ( double value ) : float
value double
Результат float

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

public static ToSingle ( int value ) : float
value int
Результат float

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

public static ToSingle ( long value ) : float
value long
Результат float

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

public static ToSingle ( uint value ) : float
value uint
Результат float

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

public static ToSingle ( ulong value ) : float
value ulong
Результат float

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

public static ToUInt32 ( float value ) : uint
value float
Результат uint

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

public static ToUInt32 ( ulong value ) : uint
value ulong
Результат uint

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

public static ToUInt64 ( float value ) : ulong
value float
Результат ulong

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

public static ToUInt64 ( uint value ) : ulong
value uint
Результат ulong