Class Native
Base class for native interop.
Inheritance
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Native
Fields
Alloc64Callback
A static alloc callback (64-bit aligned).
Declaration
protected static Native.AllocCallbackDelegate Alloc64Callback
Field Value
Type | Description |
---|---|
Native.AllocCallbackDelegate |
AllocCallback
A static alloc callback.
Declaration
protected static Native.AllocCallbackDelegate AllocCallback
Field Value
Type | Description |
---|---|
Native.AllocCallbackDelegate |
DebugLogCallback
A static debug log callback.
Declaration
protected static Native.DebugLogCallbackDelegate DebugLogCallback
Field Value
Type | Description |
---|---|
Native.DebugLogCallbackDelegate |
DebugLogWithScopeCallback
A static debug log with scope callback.
Declaration
protected static Native.DebugLogWithScopeCallbackDelegate DebugLogWithScopeCallback
Field Value
Type | Description |
---|---|
Native.DebugLogWithScopeCallbackDelegate |
ErrorLogCallback
A static error log callback.
Declaration
protected static Native.ErrorLogCallbackDelegate ErrorLogCallback
Field Value
Type | Description |
---|---|
Native.ErrorLogCallbackDelegate |
ErrorLogWithScopeCallback
A static error log with scope callback.
Declaration
protected static Native.ErrorLogWithScopeCallbackDelegate ErrorLogWithScopeCallback
Field Value
Type | Description |
---|---|
Native.ErrorLogWithScopeCallbackDelegate |
InfoLogCallback
A static info log callback.
Declaration
protected static Native.InfoLogCallbackDelegate InfoLogCallback
Field Value
Type | Description |
---|---|
Native.InfoLogCallbackDelegate |
InfoLogWithScopeCallback
A static info log with scope callback.
Declaration
protected static Native.InfoLogWithScopeCallbackDelegate InfoLogWithScopeCallback
Field Value
Type | Description |
---|---|
Native.InfoLogWithScopeCallbackDelegate |
ReleaseCallback
A static release callback.
Declaration
protected static Native.ReleaseCallbackDelegate ReleaseCallback
Field Value
Type | Description |
---|---|
Native.ReleaseCallbackDelegate |
WarnLogCallback
A static warn log callback.
Declaration
protected static Native.WarnLogCallbackDelegate WarnLogCallback
Field Value
Type | Description |
---|---|
Native.WarnLogCallbackDelegate |
WarnLogWithScopeCallback
A static warn log with scope callback.
Declaration
protected static Native.WarnLogWithScopeCallbackDelegate WarnLogWithScopeCallback
Field Value
Type | Description |
---|---|
Native.WarnLogWithScopeCallbackDelegate |
Methods
Alloc(Int32)
Allocates memory from the data buffer pool.
Declaration
[MonoPInvokeCallback(typeof(Native.AllocCallbackDelegate))]
protected static IntPtr Alloc(int size)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | size | The number of bytes to allocate. |
Returns
Type | Description |
---|---|
System.IntPtr |
Alloc64Align(Int32)
Allocates 64-bit aligned memory from the data buffer pool.
Declaration
[MonoPInvokeCallback(typeof(Native.AllocCallbackDelegate))]
protected static IntPtr Alloc64Align(int size)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | size | The number of bytes to allocate. |
Returns
Type | Description |
---|---|
System.IntPtr |
DebugLog(String)
Logs a debug message.
Declaration
[MonoPInvokeCallback(typeof(Native.DebugLogCallbackDelegate))]
protected static void DebugLog(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message. |
DebugLogWithScope(String, String)
Logs a debug message.
Declaration
[MonoPInvokeCallback(typeof(Native.DebugLogCallbackDelegate))]
protected static void DebugLogWithScope(string scope, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope. |
System.String | message | The message. |
ErrorLog(String)
Logs an error message.
Declaration
[MonoPInvokeCallback(typeof(Native.ErrorLogCallbackDelegate))]
protected static void ErrorLog(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message. |
ErrorLogWithScope(String, String)
Logs an error message.
Declaration
[MonoPInvokeCallback(typeof(Native.ErrorLogCallbackDelegate))]
protected static void ErrorLogWithScope(string scope, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope. |
System.String | message | The message. |
InfoLog(String)
Logs an info message.
Declaration
[MonoPInvokeCallback(typeof(Native.InfoLogCallbackDelegate))]
protected static void InfoLog(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message. |
InfoLogWithScope(String, String)
Logs an info message.
Declaration
[MonoPInvokeCallback(typeof(Native.InfoLogCallbackDelegate))]
protected static void InfoLogWithScope(string scope, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope. |
System.String | message | The message. |
PullBuffer(IntPtr)
Gets the data buffer associated with a pointer. This buffer MUST be freed later.
Declaration
protected static DataBuffer PullBuffer(IntPtr pointer)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | pointer | The native pointer. |
Returns
Type | Description |
---|---|
DataBuffer |
Release(IntPtr)
Releases memory to the data buffer pool.
Declaration
[MonoPInvokeCallback(typeof(Native.ReleaseCallbackDelegate))]
protected static void Release(IntPtr pointer)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | pointer | The native pointer. |
WarnLog(String)
Logs a warn message.
Declaration
[MonoPInvokeCallback(typeof(Native.WarnLogCallbackDelegate))]
protected static void WarnLog(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message. |
WarnLogWithScope(String, String)
Logs a warn message.
Declaration
[MonoPInvokeCallback(typeof(Native.WarnLogCallbackDelegate))]
protected static void WarnLogWithScope(string scope, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope. |
System.String | message | The message. |