예제 #1
0
        private async Task GetAndSetIterations()
        {
            if (SelectedProject != null && SelectedTeam != null)
            {
                var iterations = await _vsService.GetIterations(SelectedProject, SelectedTeam);

                if (iterations != null && iterations.Any())
                {
                    Iterations        = new ObservableCollection <Iteration>(iterations.OrderByDescending(iteration => iteration.Name));
                    SelectedIteration = Iterations.Single(iteration => iteration.IsCurrent);
                }
                else
                {
                    Iterations        = null;
                    SelectedIteration = null;
                }
            }
            else
            {
                Iterations        = null;
                SelectedIteration = null;
            }
        }