|
static void | Match< TLeft, TRight > (this Either< TLeft, TRight > either, Action< TLeft > ifLeft, Action< TRight > ifRight) |
|
static Either< string, TRight > | ToEither< TRight > (this TRight value) |
| Equivalent to monadic CSharpx.Either.Return<TRight> operation. Builds a CSharpx.Right<TLeft, TRight> value in case value by default.
|
|
static Either< TLeft, TResult > | Bind< TLeft, TRight, TResult > (this Either< TLeft, TRight > either, Func< TRight, Either< TLeft, TResult > > func) |
|
static Either< TLeft, TResult > | Map< TLeft, TRight, TResult > (this Either< TLeft, TRight > either, Func< TRight, TResult > func) |
|
static Either< TLeft1, TRight1 > | Bimap< TLeft, TRight, TLeft1, TRight1 > (this Either< TLeft, TRight > either, Func< TLeft, TLeft1 > mapLeft, Func< TRight, TRight1 > mapRight) |
|
static bool | IsLeft< TLeft, TRight > (this Either< TLeft, TRight > either) |
|
static bool | IsRight< TLeft, TRight > (this Either< TLeft, TRight > either) |
|
Definition at line 286 of file Either.cs.
◆ Bimap< TLeft, TRight, TLeft1, TRight1 >()
static Either< TLeft1, TRight1 > CSharpx.EitherExtensions.Bimap< TLeft, TRight, TLeft1, TRight1 > |
( |
this Either< TLeft, TRight > |
either, |
|
|
Func< TLeft, TLeft1 > |
mapLeft, |
|
|
Func< TRight, TRight1 > |
mapRight |
|
) |
| |
|
static |
Definition at line 329 of file Either.cs.
332 {
333 return Either.Bimap(either, mapLeft, mapRight);
334 }
◆ Bind< TLeft, TRight, TResult >()
static Either< TLeft, TResult > CSharpx.EitherExtensions.Bind< TLeft, TRight, TResult > |
( |
this Either< TLeft, TRight > |
either, |
|
|
Func< TRight, Either< TLeft, TResult > > |
func |
|
) |
| |
|
static |
Definition at line 317 of file Either.cs.
319 {
320 return Either.Bind(either, func);
321 }
◆ IsLeft< TLeft, TRight >()
static bool CSharpx.EitherExtensions.IsLeft< TLeft, TRight > |
( |
this Either< TLeft, TRight > |
either | ) |
|
|
static |
◆ IsRight< TLeft, TRight >()
static bool CSharpx.EitherExtensions.IsRight< TLeft, TRight > |
( |
this Either< TLeft, TRight > |
either | ) |
|
|
static |
◆ Map< TLeft, TRight, TResult >()
static Either< TLeft, TResult > CSharpx.EitherExtensions.Map< TLeft, TRight, TResult > |
( |
this Either< TLeft, TRight > |
either, |
|
|
Func< TRight, TResult > |
func |
|
) |
| |
|
static |
Definition at line 323 of file Either.cs.
325 {
326 return Either.Map(either, func);
327 }
◆ Match< TLeft, TRight >()
static void CSharpx.EitherExtensions.Match< TLeft, TRight > |
( |
this Either< TLeft, TRight > |
either, |
|
|
Action< TLeft > |
ifLeft, |
|
|
Action< TRight > |
ifRight |
|
) |
| |
|
static |
Definition at line 290 of file Either.cs.
293 {
294 TLeft left;
295
296 if (either.MatchLeft(out left))
297 {
298 ifLeft(left);
299
300 return;
301 }
302
303 ifRight(((Right<TLeft, TRight>)either).Value);
304 }
◆ ToEither< TRight >()
static Either< string, TRight > CSharpx.EitherExtensions.ToEither< TRight > |
( |
this TRight |
value | ) |
|
|
static |
Equivalent to monadic CSharpx.Either.Return<TRight> operation. Builds a CSharpx.Right<TLeft, TRight> value in case value by default.
Definition at line 312 of file Either.cs.
313 {
314 return Either.Return(value);
315 }
The documentation for this class was generated from the following file:
- deps/commandlineparser/src/CommandLine/Infrastructure/CSharpx/Either.cs