C# Class Microsoft.Async.Transformations.DisposableAsyncFunction

A wrapper for an async factory and disposable.
Inheritance: IDisposable
Afficher le fichier Open project: rozele/Microsoft.Async.Transformations Class Usage Examples

Méthodes publiques

Méthode Description
DisposableAsyncFunction ( Task>.Func asyncFunction, IDisposable disposable ) : System

Instantiates a DisposableAsyncFunction.

Dispose ( ) : void

Disposes the IDisposable provided in the constructor.

InvokeAsync ( CancellationToken token ) : Task

Invokes the asynchronous function provided in the constructor.

Method Details

DisposableAsyncFunction() public méthode

Instantiates a DisposableAsyncFunction.
public DisposableAsyncFunction ( Task>.Func asyncFunction, IDisposable disposable ) : System
asyncFunction Task>.Func An asynchronous function.
disposable IDisposable A disposable.
Résultat System

Dispose() public méthode

Disposes the IDisposable provided in the constructor.
public Dispose ( ) : void
Résultat void

InvokeAsync() public méthode

Invokes the asynchronous function provided in the constructor.
public InvokeAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken /// A token to cancel the asynchronous request. ///
Résultat Task