Ejemplo n.º 1
0
 public static Try <A> Where <A>(this Try <A> either,
                                 Predicate <A> predicate, String message)
 => either.Where(predicate, () => message);
Ejemplo n.º 2
0
 public static Try <A> WhereNot <A>(this Try <A> incoming,
                                    Predicate <A> notPredicate, Func <Exception> errorCallback)
 => incoming.Where(x => !notPredicate(x), errorCallback);
Ejemplo n.º 3
0
 public static Try <A> Where <A>(this Try <A> either,
                                 Predicate <A> predicate, Func <String> errorCallback)
 => either.Where(predicate, () => new Exception(errorCallback()));