Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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));
 }