Interface INativeCustomMarshaler
Custom marshaler for usage with the MemoryHelper for performing marshaling to-and-from unmanaged memory for non-blittable types. A type must be attributed with NativeCustomMarshalerAttribute to automatically have an instance of its marshaler be utilized.
Namespace: SharpAssimp
Assembly: SharpAssimp.dll
Syntax
public interface INativeCustomMarshaler
Properties
| Edit this page View SourceNativeDataSize
Gets the native data size in bytes.
Declaration
int NativeDataSize { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceMarshalManagedToNative(object, nint)
Marshals the managed object to the unmanaged chunk of memory.
Declaration
void MarshalManagedToNative(object managedObj, nint nativeData)
Parameters
Type | Name | Description |
---|---|---|
object | managedObj | Managed object to marshal. |
nint | nativeData | Unmanaged chunk of memory to write to. |
MarshalNativeToManaged(nint)
Marshals the managed object from the unmanaged chunk of memory.
Declaration
object MarshalNativeToManaged(nint nativeData)
Parameters
Type | Name | Description |
---|---|---|
nint | nativeData | Unmanaged chunk of memory to read from. |
Returns
Type | Description |
---|---|
object | Managed object marshaled. |