mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 03:16:11 +00:00
IApiResponse no longer inherits IResponse
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Octokit
|
||||
/// <summary>
|
||||
/// Constructs an instance of ApiException
|
||||
/// </summary>
|
||||
public ApiException() : this(new ApiResponse<object>())
|
||||
public ApiException() : this(new Response())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Octokit
|
||||
/// <param name="message">The error message</param>
|
||||
/// <param name="httpStatusCode">The HTTP status code from the response</param>
|
||||
public ApiException(string message, HttpStatusCode httpStatusCode)
|
||||
: this(new ApiResponse<object> {Body = message, StatusCode = httpStatusCode})
|
||||
: this(new Response {Body = message, StatusCode = httpStatusCode})
|
||||
{
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Octokit
|
||||
/// <param name="message">The error message</param>
|
||||
/// <param name="innerException">The inner exception</param>
|
||||
public ApiException(string message, Exception innerException)
|
||||
: this(new ApiResponse<object> { Body = message }, innerException)
|
||||
: this(new Response { Body = message }, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
@@ -20,8 +19,7 @@ namespace Octokit
|
||||
/// <summary>
|
||||
/// Constructs an instance of ApiValidationException
|
||||
/// </summary>
|
||||
public ApiValidationException()
|
||||
: base(new ApiResponse<object> { StatusCode = (HttpStatusCode)422 })
|
||||
public ApiValidationException() : base(new Response { StatusCode = (HttpStatusCode)422})
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
@@ -20,7 +19,7 @@ namespace Octokit
|
||||
/// <summary>
|
||||
/// Constructs an instance of AuthorizationException
|
||||
/// </summary>
|
||||
public AuthorizationException() : base(new ApiResponse<object> { StatusCode = HttpStatusCode.Unauthorized })
|
||||
public AuthorizationException() : base(new Response { StatusCode = HttpStatusCode.Unauthorized })
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
@@ -20,7 +19,7 @@ namespace Octokit
|
||||
/// Constructs an instance of TwoFactorChallengeFailedException
|
||||
/// </summary>
|
||||
public TwoFactorChallengeFailedException() :
|
||||
base(new ApiResponse<object> { StatusCode = HttpStatusCode.Unauthorized })
|
||||
base(new Response { StatusCode = HttpStatusCode.Unauthorized })
|
||||
{
|
||||
}
|
||||
|
||||
@@ -29,7 +28,7 @@ namespace Octokit
|
||||
/// </summary>
|
||||
/// <param name="innerException">The inner exception</param>
|
||||
public TwoFactorChallengeFailedException(Exception innerException)
|
||||
: base(new ApiResponse<object> { StatusCode = HttpStatusCode.Unauthorized }, innerException)
|
||||
: base(new Response { StatusCode = HttpStatusCode.Unauthorized }, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Octokit
|
||||
/// </summary>
|
||||
/// <param name="twoFactorType">Expected 2FA response type</param>
|
||||
public TwoFactorRequiredException(TwoFactorType twoFactorType)
|
||||
: this(new ApiResponse<object> { StatusCode = HttpStatusCode.Unauthorized}, twoFactorType)
|
||||
: this(new Response { StatusCode = HttpStatusCode.Unauthorized}, twoFactorType)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user