public IOptionResult <T> Run() { IOptionResult <T> result = _self.Run(); _action(result); return(result); }
public IOptionResult <T> Run() { IOptionResult <T> result = _self.Run(); if (!result.IsNone) { return(result); } return(_selector().Run()); }
public IOptionResult <TResult> Run() { IOptionResult <T> result = _self.Run(); if (!result.IsNone) { return(_selector(result.Value).Run()); } return(NoneResult <TResult> .Default); }
public IOptionResult <T> Run() { IOptionResult <T> result = _self.Run(); if (!result.IsNone) { _action(result.Value); } return(result); }
public IOptionResult <T> Run() { IOptionResult <T> result = _self.Run(); if (!result.IsNone && _selector(result.Value)) { return(new JustResult <T>(result.Value)); } return(NoneResult <T> .Default); }
public IOptionResult <T> Run() { if (_selector()) { return(_thenSource.Run()); } else { return(NoneResult <T> .Default); } }
public IOptionResult <T> Run() { if (_selector()) { return(_thenSource.Run()); } else { return(_elseSource.Run()); } }
public IOptionResult <TResult> Run() { IOptionResult <TFirst> selfResult = _self.Run(); IOptionResult <TSecond> secondResult = _second.Run(); if (!selfResult.IsNone && !secondResult.IsNone) { return(new JustResult <TResult>(_resultSelector(selfResult.Value, secondResult.Value))); } return(NoneResult <TResult> .Default); }
public static void Execute <T>(this IOptionMonad <T> self) { IOptionResult <T> selfResult = self.Run(); if (selfResult.IsNone) { return; } else { return; } }
public IOptionResult <T> Run() { IOptionResult <T> result = _self.Run(); if (_selector(result)) { return(result); } else { return(NoneResult <T> .Default); } }
public IOptionResult <T> Run() { IOptionResult <T> result = _self.Run(); if (_selector(result)) { return(result); } else { return(_elseSource.Run()); } }
public static void Execute <T>(this IOptionMonad <T> self, Action <T> onJust) { IOptionResult <T> selfResult = self.Run(); if (selfResult.IsNone) { return; } else { onJust(selfResult.Value); return; } }
IOptionResult <T> RunSelf() { return(_self.Run()); }