Class ComAsyncExtension
An extension contains tools to marshal plugin's Task to ComAsyncResult and vice versa.
public static class ComAsyncExtension
- Inheritance
-
ComAsyncExtension
- Inherited Members
Methods
AsResult(Task)
Marshal a Task to ComAsyncResult struct (as a pointer).
public static nint AsResult(this Task task)
Parameters
Returns
- nint
A pointer into ComAsyncResult struct.
AsResult<T>(Task<T>)
Marshal a Task<TResult> to ComAsyncResult struct (as a pointer).
public static nint AsResult<T>(this Task<T> task) where T : unmanaged
Parameters
taskTask<T>A Task<TResult> to marshal into.
Returns
- nint
A pointer into ComAsyncResult struct.
Type Parameters
T
AsTask(nint)
Re-marshal a pointer of ComAsyncResult struct into a managed Task.
public static Task AsTask(this nint resultP)
Parameters
resultPnintA pointer of the ComAsyncResult struct.
Returns
AsTask<T>(nint)
Re-marshal a pointer of ComAsyncResult struct into a managed Task.
public static Task<T> AsTask<T>(this nint resultP) where T : unmanaged
Parameters
resultPnintA pointer of the ComAsyncResult struct.
Returns
Type Parameters
T