Exemple #1
0
        public Nothing Match(Action <T> value, Action empty)
        {
            if (HasValue)
            {
                value(_value);
            }
            else
            {
                empty();
            }

            return(Nothing.Of());
        }
Exemple #2
0
        public Nothing Match(Action <T> success, Action <Exception> failure)
        {
            #pragma warning disable CS8604
            if (Succeeded)
            {
                success(_value);
            }
            else
            {
                failure(_error);
            }

            return(Nothing.Of());
        }