public void RecoverFlatRecover() { bool called = false; var future = m_future.FlatRecover((NullReferenceException arg) => { return(Future.Success(32)); }); future.Recover((object o) => { called = true; }); m_promise.FulfillError(new Exception()); Assert.That(called); }
public static IFuture <K> FlatRecover <T, K>(this IFuture <T> me, Func <System.Exception, IFuture <K> > recoverFunc) where T : K { return(me.FlatRecover <T, K, Exception>(recoverFunc)); }