예제 #1
0
        private void WriteOrDelay(Action writeRequestProducer)
        {
            if (writing)
            {
                messageStash.Stash();
            }
            else
            {
                writeRequestProducer();

                var wPending = WritePending;
                if (wPending)
                {
                    Write(NextCorrelationId());
                }
                if (wPending && StateSync)
                {
                    writing = true;
                }
                else if (StateSync)
                {
                    messageStash.Unstash();
                }
            }
        }
예제 #2
0
 public sealed override void StashCommand()
 {
     if (writeReplyHandling || IsEventHandling)
     {
         throw new StashException($"{nameof(Stash)} must not be used in event handler or persist handler");
     }
     else
     {
         commandStash.Stash();
     }
 }
예제 #3
0
 public void Stash()
 {
     _userStash.Stash();
 }