예제 #1
0
        public List <TaskQueueInfoDto> GetTaskQueueStatusAsync()
        {
            var taskQueueStatus = _taskQueueManager.GetQueueStatus();

            return(taskQueueStatus.Select(taskQueueState => new TaskQueueInfoDto
            {
                Name = taskQueueState.Name,
                Size = taskQueueState.Size
            }).ToList());
        }
예제 #2
0
        public void GetQueueStatus_Test()
        {
            _taskQueueManager.CreateQueue("TestQueueA");
            _taskQueueManager.CreateQueue("TestQueueB");

            var queueInfos = _taskQueueManager.GetQueueStatus();

            queueInfos.Count.ShouldBe(2);
            queueInfos.Select(o => o.Name).ShouldContain("TestQueueA");
            queueInfos.Select(o => o.Name).ShouldContain("TestQueueB");

            _taskQueueManager.Dispose();
        }
예제 #3
0
        public List <TaskQueueInfoDto> GetTaskQueueStatusAsync()
        {
            var taskQueueStatus = _taskQueueManager.GetQueueStatus();

            return(_objectMapper.Map <List <TaskQueueInfo>, List <TaskQueueInfoDto> >(taskQueueStatus));
        }