diff --git a/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs b/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs index 9e30b366..2cbd6d73 100644 --- a/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs +++ b/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs @@ -25,7 +25,7 @@ namespace Octokit.Reactive /// See the API documentation for more information. /// /// - IObservable GetBuilds(string owner, string repositoryName); + IObservable GetAllBuilds(string owner, string repositoryName); /// /// Gets the build metadata for the last build for a given repository /// diff --git a/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs b/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs index 2f44dee6..6b23365a 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs @@ -45,7 +45,7 @@ namespace Octokit.Reactive /// See the API documentation for more information. /// /// - public IObservable GetBuilds(string owner, string repositoryName) + public IObservable GetAllBuilds(string owner, string repositoryName) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName"); diff --git a/Octokit.Tests/Clients/RepositoryPagesClientTests.cs b/Octokit.Tests/Clients/RepositoryPagesClientTests.cs index e303b2dd..b169bd83 100644 --- a/Octokit.Tests/Clients/RepositoryPagesClientTests.cs +++ b/Octokit.Tests/Clients/RepositoryPagesClientTests.cs @@ -39,7 +39,7 @@ namespace Octokit.Tests.Clients var connection = Substitute.For(); var client = new RepositoryPagesClient(connection); - client.GetBuilds("fake", "repo"); + client.GetAllBuilds("fake", "repo"); connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/pages/builds")); } diff --git a/Octokit/Clients/IRepositoryPagesClient.cs b/Octokit/Clients/IRepositoryPagesClient.cs index 25c02ea0..b04c538c 100644 --- a/Octokit/Clients/IRepositoryPagesClient.cs +++ b/Octokit/Clients/IRepositoryPagesClient.cs @@ -32,7 +32,7 @@ namespace Octokit /// See the API documentation for more information. /// /// - Task> GetBuilds(string owner, string repositoryName); + Task> GetAllBuilds(string owner, string repositoryName); /// /// Gets the build metadata for the last build for a given repository /// diff --git a/Octokit/Clients/RepositoryPagesClient.cs b/Octokit/Clients/RepositoryPagesClient.cs index 698a516f..549077be 100644 --- a/Octokit/Clients/RepositoryPagesClient.cs +++ b/Octokit/Clients/RepositoryPagesClient.cs @@ -46,7 +46,7 @@ namespace Octokit /// See the API documentation for more information. /// /// - public Task> GetBuilds(string owner, string repositoryName) + public Task> GetAllBuilds(string owner, string repositoryName) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName"); diff --git a/Octokit/Models/Response/ApiError.cs b/Octokit/Models/Response/ApiError.cs index e28368b8..b6614a0f 100644 --- a/Octokit/Models/Response/ApiError.cs +++ b/Octokit/Models/Response/ApiError.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; namespace Octokit { @@ -9,6 +11,7 @@ namespace Octokit #if !NETFX_CORE [Serializable] #endif + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class ApiError { public ApiError() { } @@ -39,5 +42,13 @@ namespace Octokit /// Additional details about the error /// public IReadOnlyList Errors { get; protected set; } + + internal string DebuggerDisplay + { + get + { + return string.Format(CultureInfo.InvariantCulture, "Message: {0}", Message); + } + } } } \ No newline at end of file diff --git a/Octokit/Models/Response/ApiErrorDetail.cs b/Octokit/Models/Response/ApiErrorDetail.cs index 253a7e59..cf7142c8 100644 --- a/Octokit/Models/Response/ApiErrorDetail.cs +++ b/Octokit/Models/Response/ApiErrorDetail.cs @@ -1,10 +1,13 @@ using System; +using System.Diagnostics; +using System.Globalization; namespace Octokit { #if !NETFX_CORE [Serializable] #endif + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class ApiErrorDetail { public ApiErrorDetail() { } @@ -24,5 +27,13 @@ namespace Octokit public string Field { get; protected set; } public string Resource { get; protected set; } + + internal string DebuggerDisplay + { + get + { + return string.Format(CultureInfo.InvariantCulture, "Message: {0}, Code: {1}, Field: {2}", Message, Code, Field); + } + } } } \ No newline at end of file diff --git a/Octokit/Models/Response/PagesBuild.cs b/Octokit/Models/Response/PagesBuild.cs index 5260209b..01bce080 100644 --- a/Octokit/Models/Response/PagesBuild.cs +++ b/Octokit/Models/Response/PagesBuild.cs @@ -1,5 +1,6 @@ using System; using System.Diagnostics; +using System.Globalization; namespace Octokit { @@ -31,7 +32,10 @@ namespace Octokit /// The status of the build. /// public PagesBuildStatus Status { get; protected set; } - public ApiError Error { get; set; } + /// + /// + /// + public ApiError Error { get; protected set; } /// /// The user whose commit intiated the build. /// @@ -46,5 +50,13 @@ namespace Octokit public TimeSpan Duration { get; protected set; } public DateTime CreatedAt { get; protected set; } public DateTime UpdatedAt { get; protected set; } + + internal string DebuggerDisplay + { + get + { + return string.Format(CultureInfo.InvariantCulture, "Pusher: {0}, Status: {1}, Duration: {2}", Pusher.Name, Status.ToString(), Duration.TotalMilliseconds); + } + } } }