Beispiel #1
0
 public IEnumerable <Query> GetQueries(string filePath)
 {
     return(_settingsRepository.GetList(filePath).Select(q => new Query
     {
         Id = q.Id,
         Name = q.Name,
         Deadline = q.Deadline,
         Jql = q.Jql
     }));
 }
Beispiel #2
0
 public IEnumerable <Tenant> Get(string path)
 {
     return(_repository.GetList(path).Select(t => new Tenant
     {
         Id = t.Id,
         Name = t.Name,
         Environments = t.Environments.Select(e => new Environment
         {
             Name = e.Name,
             Status = e.Status
         })
     }));
 }
Beispiel #3
0
 public IEnumerable <BuildProject> GetBuilds(string path)
 {
     return(_settingsRepository.GetList(path).Select(bp => new BuildProject
     {
         Id = bp.Id,
         Name = bp.Name,
         Builds = bp.Builds.Select(b => new Build
         {
             Name = b.Name,
             TypeId = b.TypeId
         })
     }));
 }
Beispiel #4
0
        public IEnumerable <Screen> GetScreens(string filePath)
        {
            var screenData = _repository.GetList(filePath).ToList();

            return(screenData.Select(screenItem => new Screen
            {
                Id = screenItem.Id,
                Name = screenItem.Name,
                Boards =
                    screenItem.Boards.Select(
                        s => new Board {
                    Id = s.Id, CategoryId = (ViewModels.Boards)s.CategoryId, Argument = s.Argument
                })
                    .ToList()
            }).OrderBy(s => s.Id).ToList());
        }
Beispiel #5
0
        public IEnumerable <Environment> SetEnvironmentOrder(IEnumerable <Environment> environments, string preferencesFilePath)
        {
            var preferences = _settingsRepository.GetList(preferencesFilePath);

            foreach (var environment in environments.ToList())
            {
                var preference = preferences.SingleOrDefault(p => p.Id == environment.Id);

                if (preference != null)
                {
                    environment.OrderId = preference.OrderId;
                }
            }

            return(environments.OrderBy(e => e.OrderId));
        }