示例#1
0
        private QueueObject CreateQueue(string queueName)
        {
            var queue = new QueueObject();

            Queues.Add(queueName, queue);
            return(queue);
        }
示例#2
0
        public static QueueObject GetQueue(string queueName)
        {
            QueueObject returnValue;

            if (_instance == null)
            {
                lock (_syncRoot)
                {
                    if (_instance == null)
                    {
                        _instance = new QueueObject();
                    }
                }
            }

            returnValue = _instance.GetQueueInternal(queueName);

            if (returnValue == null)
            {
                returnValue = _instance.CreateQueue(queueName);
            }

            return(returnValue);
        }
示例#3
0
 public void Dispose()
 {
     _instance = null;
     GC.SuppressFinalize(this);
 }