C# Class Monobjc.BlockMarshaler

Custom marshaller for Block instances. This makes interop a breeze as it cuts a lot of code.
Inheritance: ICustomMarshaler
ファイルを表示 Open project: Monobjc/monobjc

Public Methods

Method Description
CleanUpManagedData ( Object ManagedObj ) : void

Performs necessary cleanup of the managed data when it is no longer needed.

CleanUpNativeData ( IntPtr pNativeData ) : void

Performs necessary cleanup of the unmanaged data when it is no longer needed.

GetNativeDataSize ( ) : int

Returns the size of the native data to be marshaled.

MarshalManagedToNative ( Object ManagedObj ) : IntPtr

Converts the managed data to unmanaged data.

MarshalNativeToManaged ( IntPtr pNativeData ) : Object

Converts the unmanaged data to managed data.

Private Methods

Method Description
GetInstance ( String cookie ) : ICustomMarshaler

Method Details

CleanUpManagedData() public method

Performs necessary cleanup of the managed data when it is no longer needed.
public CleanUpManagedData ( Object ManagedObj ) : void
ManagedObj Object The managed object to be destroyed.
return void

CleanUpNativeData() public method

Performs necessary cleanup of the unmanaged data when it is no longer needed.
public CleanUpNativeData ( IntPtr pNativeData ) : void
pNativeData System.IntPtr A pointer to the unmanaged data to be destroyed.
return void

GetNativeDataSize() public method

Returns the size of the native data to be marshaled.
public GetNativeDataSize ( ) : int
return int

MarshalManagedToNative() public method

Converts the managed data to unmanaged data.
public MarshalManagedToNative ( Object ManagedObj ) : IntPtr
ManagedObj Object The managed object to be converted.
return System.IntPtr

MarshalNativeToManaged() public method

Converts the unmanaged data to managed data.
public MarshalNativeToManaged ( IntPtr pNativeData ) : Object
pNativeData System.IntPtr A pointer to the unmanaged data to be wrapped.
return Object