public Failable <TResult> Select <TResult>(Func <T, TResult> selector, Exception error) { if (Empty) { return(Failable.FromException <TResult>(error)); } return(Failable.From(selector(_value))); }
public Failable <T> Select() { if (Failed) #pragma warning disable CS8604 { return(Failable.FromException <T>(_error)); } return(_value); }
public Failable <TResult> Select <TResult>(Func <T, TResult> selector) { if (Failed) #pragma warning disable CS8604 { return(Failable.FromException <TResult>(_error)); } return(Failable.From(selector(_value))); }
internal Failable <T> Where(Func <T, bool> predicate, Exception error) { if (Failed) { return(this); } #pragma warning disable CS8604 else if (predicate(_value) is false) { return(Failable.FromException <T>(error)); } return(this); }