This project is read-only.

Provide an easy way to wrap Classic Async Pattern into Event-Based one


There are may components which implement Classic Async Pattern. They expose methods:
public <return> Operation(<parameters>, out <out parameters>)
public IAsyncResult BeginOperation(<parameters>, AsyncCallback callback, object state)
public <return> EndOperation(IAsyncResult asyncResult, <out parameters>)
This could correspond to:
public void OperationAsync(<parameters>)
public event AsyncFuncCompletedEventHandler<Tuple<<return>, <out parameters>>> OperationCompleted
or simplified version if tere are no <out parameters>
public void OperationAsync(<parameters>)
public event AsyncFuncCompletedEventHandler<<return>> OperationCompleted
This would require creation of a new class.