public VariadicRequestResult(TError error, ServerResponseStatus status, Exception exception)
 {
     if (error != null)
     {
         _either = new Either <TSuccess, TError>(error);
     }
     Status    = status;
     Exception = exception;
 }
 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>();
 }
示例#3
0
 public ServerResponse(ServerResponseStatus status, string title, string message)
 {
     Status = status;
     Title = title;
     Message = message;
 }
示例#4
0
 public RequestResult(TResult result, ServerResponseStatus status, Exception exception)
 {
     Result    = result;
     Status    = status;
     Exception = exception;
 }
示例#5
0
 public RequestResult(TResult result, ServerResponseStatus status, IDictionary <string, string> headers = null)
 {
     Result  = result;
     Status  = status;
     Headers = headers ?? new Dictionary <string, string>();
 }
示例#6
0
 protected void AddRedirectMessage(ServerResponseStatus status, string title, string message = "")
 {
     this.AddRedirectMessages(new[] { new ServerResponse(status, title, message) });
 }