C# Class Monobjc.Utils.TypeHelper

Utility class to manipulate Type instance and arrays.
Afficher le fichier Open project: Monobjc/monobjc

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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.

Method Details

GetNativeParameterTypes() public static méthode

Get the native conterpart of the method parameter types.
public static GetNativeParameterTypes ( MethodBase methodBase, bool is64bits ) : System.Type[]
methodBase System.Reflection.MethodBase
is64bits bool
Résultat System.Type[]

GetNativeParameterTypes() public static méthode

Get the native conterpart of the given types.
public static GetNativeParameterTypes ( Type parameterTypes, bool is64bits ) : System.Type[]
parameterTypes System.Type
is64bits bool
Résultat System.Type[]

GetNativeType() public static méthode

Get the native conterpart of the given type.
public static GetNativeType ( Type type, bool is64bits ) : Type
type System.Type
is64bits bool
Résultat System.Type

GetParameterNames() public static méthode

Extract the parameter names for the method.
public static GetParameterNames ( MethodBase methodBase ) : string[]
methodBase System.Reflection.MethodBase
Résultat string[]

GetParameterTypes() public static méthode

Extract the parameter types for the method.
public static GetParameterTypes ( MethodBase methodBase ) : System.Type[]
methodBase System.Reflection.MethodBase
Résultat System.Type[]

NeedWrapping() public static méthode

Tells if the given type need to be wrapped as a native pointer.
public static NeedWrapping ( Type type ) : bool
type System.Type
Résultat bool

ToDouble() public static méthode

public static ToDouble ( float value ) : double
value float
Résultat double

ToInt32() public static méthode

public static ToInt32 ( float value ) : int
value float
Résultat int

ToInt32() public static méthode

public static ToInt32 ( long value ) : int
value long
Résultat int

ToInt64() public static méthode

public static ToInt64 ( float value ) : long
value float
Résultat long

ToInt64() public static méthode

public static ToInt64 ( int value ) : long
value int
Résultat long

ToSingle() public static méthode

public static ToSingle ( double value ) : float
value double
Résultat float

ToSingle() public static méthode

public static ToSingle ( int value ) : float
value int
Résultat float

ToSingle() public static méthode

public static ToSingle ( long value ) : float
value long
Résultat float

ToSingle() public static méthode

public static ToSingle ( uint value ) : float
value uint
Résultat float

ToSingle() public static méthode

public static ToSingle ( ulong value ) : float
value ulong
Résultat float

ToUInt32() public static méthode

public static ToUInt32 ( float value ) : uint
value float
Résultat uint

ToUInt32() public static méthode

public static ToUInt32 ( ulong value ) : uint
value ulong
Résultat uint

ToUInt64() public static méthode

public static ToUInt64 ( float value ) : ulong
value float
Résultat ulong

ToUInt64() public static méthode

public static ToUInt64 ( uint value ) : ulong
value uint
Résultat ulong