Exemplo n.º 1
0
 public static HttpResult Success(HttpResultCode code, string message, object data)
 {
     return(new HttpResult()
     {
         Code = (int)code, Message = message, Data = data
     });
 }
Exemplo n.º 2
0
 public static HttpResult Success(HttpResultCode code, object data)
 {
     return(new HttpResult()
     {
         Code = (int)code, Message = code.GetDisplayName(), Data = data
     });
 }
Exemplo n.º 3
0
 public static HttpResult <T> Result(HttpResultCode code, T data, string remark = "")
 {
     return(new HttpResult <T>()
     {
         Code = (int)code,
         Data = data,
         Remark = remark
     });
 }
Exemplo n.º 4
0
 public ApiException(HttpResultCode err) : base(err.ToString())
 {
     this.HResult = (int)err;
 }