Пример #1
0
        public void ShowBuildConfigs()
        {
            var configs = _reader.GetBuildConfigs();

            foreach (var sharpConfig in configs)
            {
                var sharpBuilds = _reader.GetBuildsByConfigId(sharpConfig.Id);
                var config      = SharpMapper.ToBuildConfig(sharpConfig, sharpBuilds);

                _writer.Write(string.Format(
                                  "Build Config:  Name = {0}\t Project = {1}\n{2}",
                                  config.Name,
                                  config.ProjectName,
                                  JsonConvert.SerializeObject(config)));

                //ShowBuilds(sharpBuilds);
            }
        }
Пример #2
0
        public static List <BuildConfig> ToBuildConfigList(
            List <TeamCitySharp.DomainEntities.BuildConfig> sharpBuildConfigsList, TeamCityReader reader)
        {
            var buildConfigList = new List <BuildConfig>();

            if (sharpBuildConfigsList == null)
            {
                return(buildConfigList);
            }

            foreach (var sharpConfig in sharpBuildConfigsList)
            {
                var sharpBuilds = reader.GetBuildsByConfigId(sharpConfig.Id);
                buildConfigList.Add(ToBuildConfig(sharpConfig, sharpBuilds));
            }

            return(buildConfigList);
        }