public static void Execute <TLeft, TRight>(this IEitherMonad <TLeft, TRight> self) { IEitherResult <TLeft, TRight> selfResult = self.Run(); if (selfResult.IsRight) { return; } else { return; } }
public static void Execute <TLeft, TRight>(this IEitherMonad <TLeft, TRight> self, Action <TRight> onRight) { IEitherResult <TLeft, TRight> selfResult = self.RunEither(); if (selfResult.IsRight) { return; } else { onRight(selfResult.Right); return; } }
public static IIdentityMonad <TResult> MatchRightOrDefault <TLeft, TRight, TResult>(this IEitherMonad <TLeft, TRight> self, Func <TRight, TResult> selector, TResult defaultValue = default(TResult)) { return(new MatchRightOrDefaultCore <TLeft, TRight, TResult>(self, selector, defaultValue)); }
public IfCore(IEitherMonad <TLeft, TRight> self, IEitherMonad <TLeft, TRight> elseSource, Func <IEitherResult <TLeft, TRight>, bool> selector) { _self = self; _elseSource = elseSource; _selector = selector; }
public static IEitherMonad <TLeft, TResultRight> Select <TLeft, TRight, TResultRight>(this IEitherMonad <TLeft, TRight> self, Func <TRight, TResultRight> selector) { return(new SelectCore <TLeft, TRight, TResultRight>(self, selector)); }
public static IEitherMonad <TLeft, TRight> Do <TLeft, TRight>(this IEitherMonad <TLeft, TRight> self, Action <IEitherResult <TLeft, TRight> > action) { return(new DoCore <TLeft, TRight>(self, action)); }
public static IIdentityMonad <TResult> Match <TLeft, TRight, TResult>(this IEitherMonad <TLeft, TRight> self, Func <TLeft, TResult> leftSelector, Func <TRight, TResult> rightSelector) { return(new MatchCore <TLeft, TRight, TResult>(self, leftSelector, rightSelector)); }
public ShareCore(IEitherMonad <TLeft, TRight> self) { _self = self; _lazy = Lazy.Create <IEitherResult <TLeft, TRight> >(RunSelf); }
public AsDefaultPermissionCore(IEitherMonad <TLeft, TRight> self) { _self = self; }
public static IEitherMonad <TLeft, TRight> AsDefaultPermission <TLeft, TRight>(this IEitherMonad <TLeft, TRight> self) { return(new AsDefaultPermissionCore <TLeft, TRight>(self)); }
public static IEitherMonad <TLeft, TRight> If <TLeft, TRight>(IEitherMonad <TLeft, TRight> thenSource, IEitherMonad <TLeft, TRight> elseSource, Func <bool> selector) { return(new IfStaticCore <TLeft, TRight>(thenSource, elseSource, selector)); }
public IfStaticCore(IEitherMonad <TLeft, TRight> thenSource, IEitherMonad <TLeft, TRight> elseSource, Func <bool> selector) { _thenSource = thenSource; _elseSource = elseSource; _selector = selector; }
public static IEitherMonad <TLeft, TRight> If <TLeft, TRight>(this IEitherMonad <TLeft, TRight> self, IEitherMonad <TLeft, TRight> elseSource, Func <IEitherResult <TLeft, TRight>, bool> selector) { return(new IfCore <TLeft, TRight>(self, elseSource, selector)); }
public static IEitherMonad <TLeft, TRight> DoOnRight <TLeft, TRight>(this IEitherMonad <TLeft, TRight> self, Action <TRight> action) { return(new DoOnRightCore <TLeft, TRight>(self, action)); }
public static IEitherMonad <TLeft, TRight> AsThrowable <TLeft, TRight>(this IEitherMonad <TLeft, TRight> self) { return(new AsThrowableCore <TLeft, TRight>(self)); }
public DoOnRightCore(IEitherMonad <TLeft, TRight> self, Action <TRight> action) { _self = self; _action = action; }
public AsThrowableCore(IEitherMonad <TLeft, TRight> self) { _self = self; }
public static IEitherMonad <TLeft, TRight> Share <TLeft, TRight>(this IEitherMonad <TLeft, TRight> self) { return(new ShareCore <TLeft, TRight>(self)); }
public static IIdentityMonad <TResult> MatchRight <TLeft, TRight, TResult>(this IEitherMonad <TLeft, TRight> self, Func <TRight, TResult> selector) { return(new MatchRightCore <TLeft, TRight, TResult>(self, selector)); }
public MatchCore(IEitherMonad <TLeft, TRight> self, Func <TLeft, TResult> leftSelector, Func <TRight, TResult> rightSelector) { _self = self; _leftSelector = leftSelector; _rightSelector = rightSelector; }
public MatchRightUnitCore(IEitherMonad <TLeft, TRight> self, Action <TRight> action) { _self = self; _action = action; }
public static IEitherMonad <TLeft, TResultRight> SelectMany <TLeft, TFirstRight, TSecondResult, TResultRight>(this IEitherMonad <TLeft, TFirstRight> self, Func <TFirstRight, IEitherMonad <TLeft, TSecondResult> > selector, Func <TFirstRight, TSecondResult, TResultRight> projector) { return(new SelectManyCore <TLeft, TFirstRight, TSecondResult, TResultRight>(self, selector, projector)); }
public static IIdentityMonad <Unit> MatchRight <TLeft, TRight, TResult>(this IEitherMonad <TLeft, TRight> self, Action <TRight> action) { return(new MatchRightUnitCore <TLeft, TRight, TResult>(self, action)); }
public DoCore(IEitherMonad <TLeft, TRight> self, Action <IEitherResult <TLeft, TRight> > action) { _self = self; _action = action; }
public MatchRightOrDefaultCore(IEitherMonad <TLeft, TRight> self, Func <TRight, TResult> selector, TResult defaultValue) { _self = self; _selector = selector; _defaultValue = defaultValue; }
public SelectCore(IEitherMonad <TLeft, TRight> self, Func <TRight, TResultRight> selector) { _self = self; _selector = selector; }
public static IIdentityMonad <IEitherResult <TLeft, TRight> > ToIdentity <TLeft, TRight>(this IEitherMonad <TLeft, TRight> self) { return(new ToIdentityCore <TLeft, TRight>(self)); }