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:
TomPallister
2016-07-03 20:39:08 +01:00
parent 3777e8c0c8
commit c512a772d4
36 changed files with 359 additions and 206 deletions

View 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; }
}
}

View 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)
{
}
}
}

View File

@ -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)
{
}
}
}

View File

@ -0,0 +1,9 @@
namespace Ocelot.Library.Infrastructure.Responses
{
public class OkResponse : Response
{
public OkResponse()
{
}
}
}

View File

@ -0,0 +1,9 @@
namespace Ocelot.Library.Infrastructure.Responses
{
public class OkResponse<T> : Response<T>
{
public OkResponse(T data) : base(data)
{
}
}
}

View 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; }
}
}

View File

@ -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; }
}
}