You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.0 KiB

1 year ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CK.SCP.Controller
{
/// <summary>
///返回结果类
/// </summary>
/// <typeparam name="T"></typeparam>
public class ResultObject<T>
{
public ResultObject()
{
ErrorList = new List<Exception>();
MessageList = new List<string>();
}
public string Message { set; get; }
public List<string> MessageList { set; get; }
/// <summary>
/// 返回结果
/// </summary>
public T Result { set; get; }
/// <summary>
/// 错误列表
/// </summary>
public List<Exception> ErrorList { set; get; }
/// <summary>
/// 返回状态
/// </summary>
public ReturnStatus State
{ set; get; }
}
public enum ReturnStatus
{
[Description("失败")]
Failed,
[Description("成功")]
Succeed
}
}