Exemplo n.º 1
0
 public VariadicRequestResult(TError error, ServerResponseStatus status, Exception exception)
 {
     if (error != null)
     {
         _either = new Either <TSuccess, TError>(error);
     }
     Status    = status;
     Exception = exception;
 }
Exemplo n.º 2
0
 public VariadicRequestResult(TError error, ServerResponseStatus status, IDictionary <string, string> headers = null)
 {
     if (error != null)
     {
         _either = new Either <TSuccess, TError>(error);
     }
     Status  = status;
     Headers = headers ?? new Dictionary <string, string>();
 }
Exemplo n.º 3
0
 public ServerResponse(ServerResponseStatus status, string title, string message)
 {
     Status = status;
     Title = title;
     Message = message;
 }
Exemplo n.º 4
0
 public RequestResult(TResult result, ServerResponseStatus status, Exception exception)
 {
     Result    = result;
     Status    = status;
     Exception = exception;
 }
Exemplo n.º 5
0
 public RequestResult(TResult result, ServerResponseStatus status, IDictionary <string, string> headers = null)
 {
     Result  = result;
     Status  = status;
     Headers = headers ?? new Dictionary <string, string>();
 }
Exemplo n.º 6
0
 protected void AddRedirectMessage(ServerResponseStatus status, string title, string message = "")
 {
     this.AddRedirectMessages(new[] { new ServerResponse(status, title, message) });
 }