public List <TaskQueueInfoDto> GetTaskQueueStatusAsync() { var taskQueueStatus = _taskQueueManager.GetQueueStatus(); return(taskQueueStatus.Select(taskQueueState => new TaskQueueInfoDto { Name = taskQueueState.Name, Size = taskQueueState.Size }).ToList()); }
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(); }
public List <TaskQueueInfoDto> GetTaskQueueStatusAsync() { var taskQueueStatus = _taskQueueManager.GetQueueStatus(); return(_objectMapper.Map <List <TaskQueueInfo>, List <TaskQueueInfoDto> >(taskQueueStatus)); }