mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-08-02 18:57:31 +08:00
after hours of pissing around on the mac...gave up..so got this configured how i wanted in VS2015 now to see if it works on the mac
This commit is contained in:
12
src/Ocelot.Library/Infrastructure/Responses/Error.cs
Normal file
12
src/Ocelot.Library/Infrastructure/Responses/Error.cs
Normal file
@ -0,0 +1,12 @@
|
||||
namespace Ocelot.Library.Infrastructure.Responses
|
||||
{
|
||||
public abstract class Error
|
||||
{
|
||||
public Error(string message)
|
||||
{
|
||||
Message = message;
|
||||
}
|
||||
|
||||
public string Message { get; private set; }
|
||||
}
|
||||
}
|
11
src/Ocelot.Library/Infrastructure/Responses/ErrorResponse.cs
Normal file
11
src/Ocelot.Library/Infrastructure/Responses/ErrorResponse.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ocelot.Library.Infrastructure.Responses
|
||||
{
|
||||
public class ErrorResponse : Response
|
||||
{
|
||||
public ErrorResponse(List<Error> errors) : base(errors)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ocelot.Library.Infrastructure.Responses
|
||||
{
|
||||
public class ErrorResponse<T> : Response<T>
|
||||
{
|
||||
public ErrorResponse(List<Error> errors) : base(errors)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace Ocelot.Library.Infrastructure.Responses
|
||||
{
|
||||
public class OkResponse : Response
|
||||
{
|
||||
public OkResponse()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace Ocelot.Library.Infrastructure.Responses
|
||||
{
|
||||
public class OkResponse<T> : Response<T>
|
||||
{
|
||||
public OkResponse(T data) : base(data)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
19
src/Ocelot.Library/Infrastructure/Responses/Response.cs
Normal file
19
src/Ocelot.Library/Infrastructure/Responses/Response.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ocelot.Library.Infrastructure.Responses
|
||||
{
|
||||
public abstract class Response
|
||||
{
|
||||
protected Response()
|
||||
{
|
||||
Errors = new List<Error>();
|
||||
}
|
||||
|
||||
protected Response(List<Error> errors)
|
||||
{
|
||||
Errors = errors ?? new List<Error>();
|
||||
}
|
||||
|
||||
public List<Error> Errors { get; private set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ocelot.Library.Infrastructure.Responses
|
||||
{
|
||||
public abstract class Response<T> : Response
|
||||
{
|
||||
protected Response(T data)
|
||||
{
|
||||
Data = data;
|
||||
}
|
||||
|
||||
protected Response(List<Error> errors) : base(errors)
|
||||
{
|
||||
}
|
||||
|
||||
public T Data { get; private set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user