Example #1
0
        private void ExecuteDequeue(T item)
        {
            lock (_stateLock)
            {
                var handler = Dequeued;
                handler?.Invoke(this, item);

                _state.MessageSent(item);
            }
        }
Example #2
0
        /// <summary>
        /// Method called from the state machine to dequeue the item
        /// </summary>
        void IDelayQueueContext.ExecuteDequeue(object item)
        {
            lock (_stateLock)
            {
                var handler = Dequeued;
                handler?.Invoke(this, (T)item);

                _state.MessageSent(item);
            }
        }