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