/// <summary> /// Instantiates Left with the value of <typeparamref name="TL"/> /// </summary> /// <param name="left"></param> public Either(TL left) { _left = left; State = EitherState.Left; _right = default; }
/// <summary> /// Instantiates Right with the value of <typeparamref name="TR"/> /// </summary> /// <param name="right"></param> public Either(TR right) { _right = right; State = EitherState.Right; _left = default; }
private EitherUnsafe(L left) { this.state = EitherState.IsLeft; this.right = default(R); this.left = left; }
private EitherUnsafe(R right) { this.state = EitherState.IsRight; this.right = right; this.left = default(L); }
internal Either(TRight right, TLeft left, EitherState state) { this.right = right; this.state = state; this.left = left; }