Пример #1
0
        public MessageQueueItem Enqueue(MessageQueueItem message, QueuePriority priority = QueuePriority.Medium, QueueLocation location = QueueLocation.Back)
        {
            lock(SyncRoot)
            {
                if(location == QueueLocation.Back)
                {
                    m_queue[(int)priority].Add(message);
                }
                else
                {
                    m_queue[(int)priority].Insert(0, message);
                }
            }

            return message;
        }
Пример #2
0
        public MessageQueueItem Enqueue(MessageQueueItem message, QueuePriority priority = QueuePriority.Medium, QueueLocation location = QueueLocation.Back)
        {
            lock (SyncRoot)
            {
                if (location == QueueLocation.Back)
                {
                    m_queue[(int)priority].Add(message);
                }
                else
                {
                    m_queue[(int)priority].Insert(0, message);
                }
            }

            return(message);
        }