Exemplo n.º 1
0
        public Failable <TResult> Select <TResult>(Func <T, TResult> selector, Exception error)
        {
            if (Empty)
            {
                return(Failable.FromException <TResult>(error));
            }

            return(Failable.From(selector(_value)));
        }
Exemplo n.º 2
0
        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)));
        }