private List <Project> GetAllProjects()
        {
            client.Connect(
                Properties.Settings.Default.TeamCityUser,
                Properties.Settings.Default.TeamCityPwd,
                Properties.Settings.Default.TeamCityIsGuest
                );


            return(client.AllProjects());
        }
Пример #2
0
        public IEnumerable<ProjectStatus> GetCurrentProjectStatus()
        {
            var url = System.Configuration.ConfigurationManager.AppSettings.GetValues("teamcity-hostname")?.FirstOrDefault();
            var username = System.Configuration.ConfigurationManager.AppSettings.GetValues("teamcity-username")?.FirstOrDefault();
            var pass = System.Configuration.ConfigurationManager.AppSettings.GetValues("teamcity-password")?.FirstOrDefault();            

            // https://github.com/y-gagar1n/TeamCitySharp
            var client = new TeamCitySharp.TeamCityClient(url);
            client.Connect(username, pass);
            var projects = client.Projects.All();

            var convertedProjects = this.ConvertProjects(client, projects);

            return convertedProjects;
        }
Пример #3
0
        public IEnumerable <ProjectStatus> GetCurrentProjectStatus()
        {
            var url      = System.Configuration.ConfigurationManager.AppSettings.GetValues("teamcity-hostname")?.FirstOrDefault();
            var username = System.Configuration.ConfigurationManager.AppSettings.GetValues("teamcity-username")?.FirstOrDefault();
            var pass     = System.Configuration.ConfigurationManager.AppSettings.GetValues("teamcity-password")?.FirstOrDefault();

            // https://github.com/y-gagar1n/TeamCitySharp
            var client = new TeamCitySharp.TeamCityClient(url);

            client.Connect(username, pass);
            var projects = client.Projects.All();

            var convertedProjects = this.ConvertProjects(client, projects);

            return(convertedProjects);
        }