internal void SetException(Exception exception) { if (exception is BreakException) { this._result = MaybeExResult.Nothing(); } else { this._exception = exception; } this.CallContinuation(); }
public static MaybeEx <T> Value(T value) => new MaybeEx <T>(MaybeExResult.Value(value));
public static MaybeEx <T> Nothing() => new MaybeEx <T>(MaybeExResult.Nothing());
internal void SetResult(T result) { this._result = MaybeExResult.Value(result); this.CallContinuation(); }
private MaybeEx(MaybeExResult result) { this._result = result; this.IsCompleted = true; }