示例#1
0
            public TValue Run(TEnvironment environment)
            {
                TValue result = _self.Run(environment);

                _action(result);
                return(result);
            }
 public TValue Run(TEnvironment environment)
 {
     if (_selector())
     {
         return(_thenSource.Run(environment));
     }
     else
     {
         return(_elseSource.Run(environment));
     }
 }
示例#3
0
            public TValue Run(TEnvironment environment)
            {
                TValue result = _self.Run(environment);

                if (_selector(result))
                {
                    return(result);
                }
                else
                {
                    return(_elseSource.Run(environment));
                }
            }
示例#4
0
 public static void Execute <TEnvironment, TValue>(this IReaderMonad <TEnvironment, TValue> self, TEnvironment environment)
 {
     self.Run(environment);
 }
示例#5
0
        public static void Execute <TEnvironment, TValue>(this IReaderMonad <TEnvironment, TValue> self, TEnvironment environment, Action <TValue> onValue)
        {
            TValue result = self.Run(environment);

            onValue(result);
        }
 TValue RunSelf()
 {
     return(_self.Run(_environment));
 }
 public TResult Run(TEnvironment environment)
 {
     return(_selector(_self.Run(environment)).Run(environment));
 }