Пример #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();
     }
 }
        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);
        }