public async Task <Leaderboard> GetLeaderboard(string projectId, string teamId, string iterationId)
        {
            var capacitiesTask    = _iterationsApi.GetCapacities(projectId, teamId, iterationId);
            var iterationTask     = _iterationsApi.Get(projectId, teamId, iterationId);
            var teamDaysOffTask   = _iterationsApi.GetTeamDaysOff(projectId, teamId, iterationId);
            var teamMembersTask   = _teamsApi.GetAllTeamMembers();
            var workIterationTask = _workIterationAppService.GetWorkIteration(projectId, teamId, iterationId);

            await Task.WhenAll(iterationTask, capacitiesTask, teamDaysOffTask, teamMembersTask, workIterationTask);

            var capaticies    = capacitiesTask.Result;
            var iteration     = iterationTask.Result;
            var teamDaysOff   = teamDaysOffTask.Result;
            var teamMembers   = teamMembersTask.Result;
            var workIteration = workIterationTask.Result;

            return(new Leaderboard(teamMembers, iteration, capaticies, teamDaysOff, workIteration));
        }
Ejemplo n.º 2
0
        //public double TotalEffort => this.Result.Items.Sum(x => x.TotalEffort);

        //public double TotalRemainingWork => this.Result.Items.Sum(x => x.TotalRemainingWork);

        public async Task Update(WorkIterationAppService workIterationAppService)
        {
            Result = await workIterationAppService.GetWorkIteration(ProjectId, TeamId, IterationId);

            AreaPaths = Result.Items.Select(x => x.AreaPath).Distinct().OrderBy(x => x).ToList();
        }