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