BadScript 2
Loading...
Searching...
No Matches
CSharpx.Right< TLeft, TRight > Class Template Referencesealed
Inheritance diagram for CSharpx.Right< TLeft, TRight >:
CSharpx.Either< TLeft, TRight >

Package Functions

 Right (TRight value)
 

Properties

TRight Value [get]
 
- Properties inherited from CSharpx.Either< TLeft, TRight >
EitherType Tag [get]
 

Additional Inherited Members

- Public Member Functions inherited from CSharpx.Either< TLeft, TRight >
bool MatchLeft (out TLeft value)
 
bool MatchRight (out TRight value)
 
- Static Public Member Functions inherited from CSharpx.Either< TLeft, TRight >
static Either< TLeft, TResult > Map< TLeft, TRight, TResult > (Either< TLeft, TRight > either, Func< TRight, TResult > func)
 Transforms a Either's right value by using a specified mapping function.
 
static Either< TLeft1, TRight1 > Bimap< TLeft, TRight, TLeft1, TRight1 > (Either< TLeft, TRight > either, Func< TLeft, TLeft1 > mapLeft, Func< TRight, TRight1 > mapRight)
 Maps both parts of a Either type. Applies the first function if Either is Left. Otherwise applies the second function.
 
static TRight GetOrFail< TLeft, TRight > (Either< TLeft, TRight > either)
 Returns a Either Right or fail with an exception.
 
static TLeft GetLeftOrDefault< TLeft, TRight > (Either< TLeft, TRight > either, TLeft @default)
 Returns a Either Left or a defualt value.
 
static TRight GetRightOrDefault< TLeft, TRight > (Either< TLeft, TRight > either, TRight @default)
 Returns a Either Right or a defualt value.
 
static Either< Exception, TRight > Try< TRight > (Func< TRight > func)
 Wraps a function, encapsulates any exception thrown within to a Either.
 
static Either< Exception, TRight > Cast< TRight > (object obj)
 Attempts to cast an object. Stores the cast value in 1Of2 if successful, otherwise stores the exception in 2Of2.
 
static Either< TLeft, TRight > FromMaybe< TLeft, TRight > (Maybe< TRight > maybe, TLeft left)
 
static Either< TLeft, TRight > Left< TLeft, TRight > (TLeft value)
 
static Either< TLeft, TRight > Right< TLeft, TRight > (TRight value)
 
static Either< string, TRight > Return< TRight > (TRight value)
 Inject a value into the Either type, returning Right case.
 
static Either< string, TRight > Fail< TRight > (string message)
 Fail with a message. Not part of mathematical definition of a monad.
 
static Either< TLeft, TResult > Bind< TLeft, TRight, TResult > (Either< TLeft, TRight > either, Func< TRight, Either< TLeft, TResult > > func)
 Monadic bind.
 
static Either< TLeft, TResult > Select< TLeft, TRight, TResult > (this Either< TLeft, TRight > either, Func< TRight, TResult > selector)
 Map operation compatible with Linq.
 
static Either< TLeft, TResult > SelectMany< TLeft, TRight, TResult > (this Either< TLeft, TRight > result, Func< TRight, Either< TLeft, TResult > > func)
 
- Protected Member Functions inherited from CSharpx.Either< TLeft, TRight >
 Either (EitherType tag)
 

Detailed Description

Definition at line 74 of file Either.cs.

Constructor & Destructor Documentation

◆ Right()

CSharpx.Right< TLeft, TRight >.Right ( TRight< TLeft, TRight >  value)
package

Definition at line 76 of file Either.cs.

77 : base(EitherType.Right)
78 {
79 Value = value;
80 }
TRight Value
Definition Either.cs:82
EitherType
Definition Either.cs:14

Property Documentation

◆ Value

TRight CSharpx.Right< TLeft, TRight >.Value
get

Definition at line 82 of file Either.cs.

82{ get; }

The documentation for this class was generated from the following file: