示例#1
0
 public static AjaxResultType ToAjaxResultType(this OperationEnumType responseType)
 {
     return(responseType switch
     {
         OperationEnumType.Success => AjaxResultType.Success,
         OperationEnumType.NoChanged => AjaxResultType.Info,
         _ => AjaxResultType.Error,
     });
 public OperationResponse(string message, object data, OperationEnumType type) : base(message, data, type)
 {
 }
 public OperationResponse(string message, OperationEnumType type) : base(message, null, type)
 {
 }
 public OperationResponse(OperationEnumType type = OperationEnumType.Success) : base("", null, type)
 {
 }
 public OperationResponse(string message, TData data, OperationEnumType type)
 {
     Message = message;
     Type    = type;
     Data    = data;
 }
 public OperationResponse(string message, OperationEnumType type) : this(message, default(TData), type)
 {
 }
 public OperationResponse(OperationEnumType type = OperationEnumType.Success) : this("", default(TData), type)
 {
 }