对比新文件 |
| | |
| | | 锘縰sing System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_Core |
| | | { |
| | | public class WebResponseContent |
| | | { |
| | | public WebResponseContent() |
| | | { |
| | | } |
| | | public WebResponseContent(bool status) |
| | | { |
| | | Status = status; |
| | | } |
| | | public bool Status { get; set; } |
| | | |
| | | public int Code { get; set; } |
| | | |
| | | public string Message { get; set; } |
| | | |
| | | public object Data { get; set; } |
| | | |
| | | public string DevMessage { get; set; } |
| | | |
| | | public WebResponseContent OK() |
| | | { |
| | | Status = true; |
| | | return this; |
| | | } |
| | | |
| | | public static WebResponseContent Instance |
| | | { |
| | | get { return new WebResponseContent(); } |
| | | } |
| | | public WebResponseContent OK(string message = null, object data = null) |
| | | { |
| | | Status = true; |
| | | Message = message; |
| | | Data = data; |
| | | return this; |
| | | } |
| | | |
| | | public WebResponseContent Error(string message = null) |
| | | { |
| | | Status = false; |
| | | Message = message; |
| | | return this; |
| | | } |
| | | } |
| | | } |