From a76cd798c4515e09b8c059765b2d81517ce1664f Mon Sep 17 00:00:00 2001 From: Darragh Date: Fri, 3 Oct 2014 11:08:28 +0100 Subject: [PATCH 1/2] Fixing compilation error --- src/TeamCitySharp/Connection/TeamCityCaller.cs | 5 +++-- src/TeamCitySharp/TeamCitySharp.csproj | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/TeamCitySharp/Connection/TeamCityCaller.cs b/src/TeamCitySharp/Connection/TeamCityCaller.cs index 8f2cbadf..45d5b5a7 100644 --- a/src/TeamCitySharp/Connection/TeamCityCaller.cs +++ b/src/TeamCitySharp/Connection/TeamCityCaller.cs @@ -2,7 +2,8 @@ using System.IO; using System.Net; using System.Security.Authentication; -using EasyHttp.Http; +using System.Web; +using EasyHttp.Http; using TeamCitySharp.DomainEntities; using File = System.IO.File; using HttpException = EasyHttp.Infrastructure.HttpException; @@ -67,7 +68,7 @@ public void GetDownloadFormat(Action downloadHandler, string urlPart, pa throw new ArgumentException("If you are not acting as a guest you must supply userName and password"); } - urlPart = System.Web.HttpUtility.UrlEncode(urlPart); + urlPart = HttpUtility.UrlEncode(urlPart); if (string.IsNullOrEmpty(urlPart)) { throw new ArgumentException("Url must be specfied"); diff --git a/src/TeamCitySharp/TeamCitySharp.csproj b/src/TeamCitySharp/TeamCitySharp.csproj index 2e7df5aa..1a71295e 100644 --- a/src/TeamCitySharp/TeamCitySharp.csproj +++ b/src/TeamCitySharp/TeamCitySharp.csproj @@ -42,6 +42,7 @@ + From 1eebf8364ca38b389f82d1ff4be97d602e852fad Mon Sep 17 00:00:00 2001 From: Darragh Date: Mon, 6 Oct 2014 09:29:23 +0100 Subject: [PATCH 2/2] Add a method AllRunningBuilds() Returns all builds that are currently running --- TeamCitySharp.sln | 4 +++- src/TeamCitySharp/ActionTypes/Builds.cs | 6 ++++++ src/TeamCitySharp/ActionTypes/IBuilds.cs | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/TeamCitySharp.sln b/TeamCitySharp.sln index f368ed68..17b28371 100644 --- a/TeamCitySharp.sln +++ b/TeamCitySharp.sln @@ -1,6 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{263F35DD-20C1-4209-B121-E962C9328C70}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeamCitySharp.IntegrationTests", "src\Tests\IntegrationTests\TeamCitySharp.IntegrationTests.csproj", "{BA409A09-CC7B-4A71-A3D4-FE27234A721B}" diff --git a/src/TeamCitySharp/ActionTypes/Builds.cs b/src/TeamCitySharp/ActionTypes/Builds.cs index 4c52f340..953e7d8b 100644 --- a/src/TeamCitySharp/ActionTypes/Builds.cs +++ b/src/TeamCitySharp/ActionTypes/Builds.cs @@ -101,6 +101,12 @@ public List ByBuildConfigId(string buildConfigId) )); } + public List AllRunningBuilds() + { + return ByBuildLocator(BuildLocator.WithDimensions(null, null, null, null, null, null, true + )); + } + public List ByConfigIdAndTag(string buildConfigId, string tag) { return ByConfigIdAndTag(buildConfigId, new[] { tag }); diff --git a/src/TeamCitySharp/ActionTypes/IBuilds.cs b/src/TeamCitySharp/ActionTypes/IBuilds.cs index 6afba988..18f780b3 100644 --- a/src/TeamCitySharp/ActionTypes/IBuilds.cs +++ b/src/TeamCitySharp/ActionTypes/IBuilds.cs @@ -18,6 +18,7 @@ public interface IBuilds List ByConfigIdAndTag(string buildConfigId, string tag); List ByUserName(string userName); List ByBuildLocator(BuildLocator locator); + List AllRunningBuilds(); List AllSinceDate(DateTime date); List AllBuildsOfStatusSinceDate(DateTime date, BuildStatus buildStatus); List NonSuccessfulBuildsForUser(string userName);