Beispiel #1
0
        public static async Task <ScenariosModel> GetAsync(RepoInfo repo)
        {
            var mapModel = await MapModel.GetAsync(repo);

            var answer = new ScenariosModel();

            foreach (var scenario in mapModel.Scenarios)
            {
                answer.Scenarios.Add(new ScenarioModel(scenario, mapModel, repo, null));
            }

            return(answer);
        }
        public static async Task <ProposalsModel> GetAsync(RepoInfo repo)
        {
            var mapModel = await MapModel.GetAsync(repo);

            var answer = new ProposalsModel();

            if (mapModel.Proposals != null)
            {
                foreach (var proposal in mapModel.Proposals)
                {
                    answer.Proposals.Add(new ProposalModel(proposal.Id, repo)
                    {
                        Title = proposal.Title
                    });
                }
            }

            return(answer);
        }