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; }
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); }