Ejemplo n.º 1
0
 /// <summary>
 /// Complete the future with the right side, never complete if left side occurs.
 /// </summary>
 public static Future <B> dropError <A, B>(
     this Future <Either <A, B> > future, bool logOnError = false
     ) =>
 Future.a <B>(p => future.onComplete(either => either.voidFold(
                                         err => { if (logOnError)
                                                  {
                                                      Log.d.error(err.ToString());
                                                  }
                                         },
                                         p.complete
                                         )));
Ejemplo n.º 2
0
 public static Future <A> asFuture <A>(this IHeapFuture <A> f) => Future.a(f);
Ejemplo n.º 3
0
 public void UnfulfilledToASync()
 {
     unfulfilledShouldNotCallMapper(i => Future.a <int>(p => {}));
 }
Ejemplo n.º 4
0
 /** Complete the future with the right side, never complete if left side occurs. **/
 public static Future <B> dropError <A, B>(this Future <Either <A, B> > future) =>
 Future.a <B>(p => future.onSuccess(p.complete));