public List<Build> GetBuildsFor(BuildType buildType, int count = 5)
        {
            var buildsForAsync = GetBuildsForAsync(buildType, count);
            buildsForAsync.Wait();

            return buildsForAsync.Result;
        }
        public Task<List<Build>> GetBuildsForAsync(BuildType buildType, int count = 5)
        {
            var resource = String.Format("{0}?count={1}", buildType.Builds.Href, count);
            var request = GetRestRequestFor(resource);

            return
                _restClient.GetAsync<BuildResponse, List<Build>>(request,
                                                                 response => response != null ? response.Build : null);
        }
Exemplo n.º 3
0
        private void WriteLineBuildTypes(BuildType buildType)
        {
            Console.WriteLine("Build Types => {0} : {1}", buildType.Name, buildType.ProjectName);

            var builds = _teamCityClient.GetBuildsFor(buildType);

            foreach (var build in builds)
            {
                WriteLineBuild(build);
            }
        }
        public Task<BuildType> GetBuildTypeDetailsAsync(BuildType buildType)
        {
            var request = GetRestRequestFor(buildType.Href);

            return _restClient.GetAsync<BuildType>(request);
        }