Пример #1
0
        public ServiceQueue(string queuePath, Service service, ServiceQueueType queueType = ServiceQueueType.Input, ServiceQueue parentQueue = null)
        {
            ParentQueue = parentQueue;
            QueueType = queueType;
            Path = queuePath;
            Service = service;
            Name = GetQueueName(queuePath);
            _queueLengthCounter = new PerformanceCounter("MSMQ Queue", "Messages in Queue", Path, true);

            TestIfQueueIsValid();
        }
Пример #2
0
 public static ServiceQueue FromName(string queueName, Service service, ServiceQueueType queueType = ServiceQueueType.Input)
 {
     return new ServiceQueue(GetQueuePath(queueName), service, queueType);
 }