public AsyncResult(IFuture <T> future) { future.OnSuccess(result => { Result = result; IsCompleted = true; _manualResetEvent.Set(); }); future.OnError(() => { Error = future.error; IsCompleted = true; _manualResetEvent.Set(); }); }