| AsyncActivatorCreateAsyncT Method (CancellationToken) |
Asynchronously creates and initializes an instance of the specified type.
Namespace:
Ditto.AsyncInit
Assembly:
Ditto.AsyncInit (in Ditto.AsyncInit.dll) Version: 1.5.0.2281
Syntax public static Task<T> CreateAsync<T>(
CancellationToken cancellationToken
)
where T : ICancelableAsyncInit
Public Shared Function CreateAsync(Of T As ICancelableAsyncInit) (
cancellationToken As CancellationToken
) As Task(Of T)
public:
generic<typename T>
where T : ICancelableAsyncInit
static Task<T>^ CreateAsync(
CancellationToken cancellationToken
)
static member CreateAsync :
cancellationToken : CancellationToken -> Task<'T> when 'T : ICancelableAsyncInit
Parameters
- cancellationToken
- Type: System.ThreadingCancellationToken
Cancellation token.
Type Parameters
- T
- The type of object to create (must implement ICancelableAsyncInit).
Return Value
Type:
TaskTA
Task capturing the initialization.
See Also