コード例 #1
0
 internal override void BackUp(CompletesContinuation continuation)
 {
     if (continuation != null)
     {
         _continuationsBackup.Enqueue(continuation);
     }
 }
コード例 #2
0
 internal void AndThenInternal(CompletesContinuation continuation)
 {
     RegisterContinuation(continuation);
     if (ReadyToExectue.Get())
     {
         RunContinuationsWhenReady();
     }
 }
コード例 #3
0
        internal void OtherwiseInternal(BasicCompletes continuationCompletes)
        {
            var continuation = new CompletesContinuation(continuationCompletes);

            RegisterFailureContinuation(continuation);
            if (OutcomeKnown.IsSet && HasFailedValue.Get())
            {
                continuation.Run(this);
            }
        }
コード例 #4
0
 private void RegisterContinuation(CompletesContinuation continuationCompletes)
 {
     if (HasException.Get())
     {
         var currentContinuations = new CompletesContinuation[Continuations.Count];
         Continuations.CopyTo(currentContinuations, 0);
         var continuationsCount = Continuations.Count;
         for (var i = 0; i < continuationsCount; i++)
         {
             Continuations.TryDequeue(out _);
         }
         Continuations.Enqueue(continuationCompletes);
         foreach (var currentContinuation in currentContinuations)
         {
             Continuations.Enqueue(currentContinuation);
         }
     }
     else
     {
         Continuations.Enqueue(continuationCompletes);
     }
 }
コード例 #5
0
 private void RegisterFailureContinuation(CompletesContinuation continuationCompletes) =>
 FailureContinuation = continuationCompletes;
コード例 #6
0
 private void RegisterContinuation(CompletesContinuation continuationCompletes) =>
 Continuations.Enqueue(continuationCompletes);
コード例 #7
0
        internal void RecoverInternal(BasicCompletes continuationCompletes)
        {
            var continuation = new CompletesContinuation(continuationCompletes);

            RegisterExceptionContinuation(continuation);
        }
コード例 #8
0
        internal void AndThenInternal(BasicCompletes continuationCompletes)
        {
            var continuation = new CompletesContinuation(continuationCompletes);

            AndThenInternal(continuation);
        }
コード例 #9
0
 internal abstract void BackUp(CompletesContinuation continuation);
コード例 #10
0
 private void RegisterExceptionContinuation(CompletesContinuation continuationCompletes) =>
 ExceptionContinuation = continuationCompletes;
コード例 #11
0
        internal void OtherwiseInternal(BasicCompletes continuationCompletes)
        {
            var continuation = new CompletesContinuation(continuationCompletes);

            RegisterFailureContinuation(continuation);
        }