Beispiel #1
0
 public async Task ScheduleMailbox(ProcessingMailbox <TMessage> mailbox)
 {
     if (mailbox.EnterHandlingMessage())
     {
         await mailbox.Run().ConfigureAwait(false);
     }
 }
        private void CompleteProcessMessage(CompleteMessageCommand <IMessageContext> command)
        {
            ProcessingMailbox <IMessageContext> mailbox = command.Mailbox;

            if (mailbox.MessageQueue.Count == 0)
            {
                _mailboxDict.TryRemove(mailbox.Key);
            }
        }
Beispiel #3
0
 private void HandleMailboxEmpty(ProcessingMailbox <IMessageContext> mailbox)
 {
     _mailboxProcessorCommands.Add(new CompleteMessageCommand <IMessageContext>(mailbox));
 }
Beispiel #4
0
 public CompleteMessageCommand(ProcessingMailbox <TMessage> mailbox)
 {
     Mailbox = mailbox;
 }