Пример #1
0
        /// <summary>
        /// Loads the available builds from the build server.
        /// </summary>
        /// <param name="builds">The collection to populate.</param>
        public void LoadBuilds(ICollection<BuildSetting> builds)
        {
            builds.Clear();

            //var teamProjects = this.versionControlServer.GetAllTeamProjects(true);
            var teamProjects = this.commonStructureService.ListAllProjects();
            foreach (var project in teamProjects)
            {
                IBuildDefinition[] projectBuilds = this.buildServer.QueryBuildDefinitions(project.Name);

                foreach (var definition in projectBuilds)
                {
                    BuildSetting buildSettingDataModel = new BuildSetting()
                    {
                        DefinitionName = definition.Name,
                        TeamProject = project.Name
                    };

                    builds.Add(buildSettingDataModel);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Loads the available builds from the build server.
        /// </summary>
        /// <param name="builds">The collection to populate.</param>
        public void LoadBuilds(ICollection<BuildSetting> builds)
        {
            builds.Clear();

            TeamProject[] teamProjects = this.versionControlServer.GetAllTeamProjects(true);

            foreach (TeamProject project in teamProjects)
            {
                IBuildDefinition[] projectBuilds = this.buildServer.QueryBuildDefinitions(project.Name);

                foreach (IBuildDefinition definition in projectBuilds)
                {
                    BuildSetting buildSettingDataModel = new BuildSetting()
                    {
                        DefinitionName = definition.Name,
                        TeamProject = project.Name
                    };

                    builds.Add(buildSettingDataModel);
                }
            }
        }