IScope<T>.WithScopeAsync(T, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enter a scope of code keyed by item.
public System.Threading.Tasks.Task<IDisposable> WithScopeAsync (T item, System.Threading.CancellationToken token);
abstract member WithScopeAsync : 'T * System.Threading.CancellationToken -> System.Threading.Tasks.Task<IDisposable>
Public Function WithScopeAsync (item As T, token As CancellationToken) As Task(Of IDisposable)
Parameters
- item
- T
The item.
- token
- CancellationToken
The cancellation token.
Returns
A task whose completion produces an IDisposable for the scope.