Ejemplo n.º 1
0
 internal override void BackUp(CompletesContinuation continuation)
 {
     if (continuation != null)
     {
         _continuationsBackup.Enqueue(continuation);
     }
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 5
0
 private void RegisterFailureContinuation(CompletesContinuation continuationCompletes) =>
 FailureContinuation = continuationCompletes;
Ejemplo n.º 6
0
 private void RegisterContinuation(CompletesContinuation continuationCompletes) =>
 Continuations.Enqueue(continuationCompletes);
Ejemplo n.º 7
0
        internal void RecoverInternal(BasicCompletes continuationCompletes)
        {
            var continuation = new CompletesContinuation(continuationCompletes);

            RegisterExceptionContinuation(continuation);
        }
Ejemplo n.º 8
0
        internal void AndThenInternal(BasicCompletes continuationCompletes)
        {
            var continuation = new CompletesContinuation(continuationCompletes);

            AndThenInternal(continuation);
        }
Ejemplo n.º 9
0
 internal abstract void BackUp(CompletesContinuation continuation);
Ejemplo n.º 10
0
 private void RegisterExceptionContinuation(CompletesContinuation continuationCompletes) =>
 ExceptionContinuation = continuationCompletes;
Ejemplo n.º 11
0
        internal void OtherwiseInternal(BasicCompletes continuationCompletes)
        {
            var continuation = new CompletesContinuation(continuationCompletes);

            RegisterFailureContinuation(continuation);
        }