C# Class Corlib.Threading.Tasks.AsyncResultExtensions

Extension methods for IAsyncResult
Mostra file Open project: GeorgeTsiokos/corlib

Public Methods

Method Description
ToTask ( this asyncResult, System.TimeSpan timeout = null, AsyncCallback asyncCallback = null ) : IDisposable

Converts a IAsyncResult in to a disposable task

Calling dispose releases the resources held to create the task (the task will no longer timeout or complete)

Method Details

ToTask() public static method

Converts a IAsyncResult in to a disposable task
Calling dispose releases the resources held to create the task (the task will no longer timeout or complete)
public static ToTask ( this asyncResult, System.TimeSpan timeout = null, AsyncCallback asyncCallback = null ) : IDisposable
asyncResult this the object to convert
timeout System.TimeSpan an optional timeout
asyncCallback AsyncCallback optional callback when the /// asynchrounous operation completes
return IDisposable