AsyncStatementUseT Method (IAsyncStatement, FuncIStatement, CancellationToken, T, CancellationToken) |
Schedules the FuncT, TResultf on the statement's operations queue.
Namespace: SQLitePCL.prettyAssembly: SQLitePCL.pretty.Async (in SQLitePCL.pretty.Async.dll) Version: 1.0.0.0 (1.0.0)
Syntax public static Task<T> Use<T>(
this IAsyncStatement This,
Func<IStatement, CancellationToken, T> f,
CancellationToken cancellationToken
)
[<ExtensionAttribute>]
static member Use :
This : IAsyncStatement *
f : Func<IStatement, CancellationToken, 'T> *
cancellationToken : CancellationToken -> Task<'T>
Parameters
- This
- Type: SQLitePCL.prettyIAsyncStatement
The async statement. - f
- Type: SystemFuncIStatement, CancellationToken, T
A function from IAsyncStatement to T. - cancellationToken
- Type: System.ThreadingCancellationToken
Cancellation token that can be used to cancel the task.
Type Parameters
- T
- The result type.
Return Value
Type:
TaskTA task that completes with the result of
f.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IAsyncStatement. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also