Пример #1
0
 internal void SetException(Exception exception)
 {
     if (exception is BreakException)
     {
         this._result = MaybeExResult.Nothing();
     }
     else
     {
         this._exception = exception;
     }
     this.CallContinuation();
 }
Пример #2
0
 public static MaybeEx <T> Value(T value) => new MaybeEx <T>(MaybeExResult.Value(value));
Пример #3
0
 public static MaybeEx <T> Nothing() => new MaybeEx <T>(MaybeExResult.Nothing());
Пример #4
0
 internal void SetResult(T result)
 {
     this._result = MaybeExResult.Value(result);
     this.CallContinuation();
 }
Пример #5
0
 private MaybeEx(MaybeExResult result)
 {
     this._result     = result;
     this.IsCompleted = true;
 }