Beispiel #1
0
 /// <summary>
 /// 初始化一个<see cref="OperationResult"/>类型的新实例
 /// </summary>
 public OperationResult(OperationResultType resultType)
 {
     ResultType = resultType;
 }
 /// <summary>
 ///     初始化一个 定义返回消息与日志消息的业务操作结果信息类 的新实例
 /// </summary>
 /// <param name="resultType">业务操作结果类型</param>
 /// <param name="message">业务返回消息</param>
 /// <param name="logMessage">业务日志记录消息</param>
 public OperationResult(OperationResultType resultType, string message, string logMessage)
     : this(resultType, message)
 {
     LogMessage = logMessage;
 }
 /// <summary>
 ///     初始化一个 定义返回消息、日志消息与附加数据的业务操作结果信息类 的新实例
 /// </summary>
 /// <param name="resultType">业务操作结果类型</param>
 /// <param name="message">业务返回消息</param>
 /// <param name="logMessage">业务日志记录消息</param>
 /// <param name="appendData">业务返回数据</param>
 public OperationResult(OperationResultType resultType, string message, string logMessage, object appendData)
     : this(resultType, message, logMessage)
 {
     AppendData = appendData;
 }
Beispiel #4
0
 private OperationResult(OperationResultType resultType, Exception ex)
 {
     ResultType = resultType;
     Exception = ex;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="OperationResult"/> class.
 /// 初始化操作结果实例
 /// </summary>
 /// <param name="resultType">
 /// The result type.
 /// 操作结果类型
 /// </param>
 public OperationResult(OperationResultType resultType)
 {
     this.ResultType = resultType;
 }
Beispiel #6
0
 /// <summary>
 /// 初始化一个<see cref="ApiResult"/>类型的新实例
 /// </summary>
 public ApiResult(OperationResultType type = OperationResultType.Success, string content = "", object data = null)
     : this(content, data, type)
 { }
 public OperationResult(OperationResultType resultType, string message, T appendData)
     : this(resultType, message)
 {
     AppendData = appendData;
 }
Beispiel #8
0
 /// <summary>
 /// 初始化一个<see cref="OperationResult"/>类型的新实例
 /// </summary>
 public OperationResult(OperationResultType resultType, string message, object data)
     : base(resultType, message, data)
 {
 }
Beispiel #9
0
 public OperationResult(OperationResultType resultType, string message)
     : this(resultType)
 {
     this.Message = message;
 }
Beispiel #10
0
 /// <summary>
 /// 初始化一个<see cref="OperationResult"/>类型的新实例
 /// </summary>
 public OperationResult(OperationResultType resultType)
     : this(resultType, null, null)
 {
 }
Beispiel #11
0
 /// <summary>
 /// 初始化一个<see cref="OperationResult"/>类型的新实例
 /// </summary>
 public OperationResult(OperationResultType resultType, string message)
     : this(resultType, message, null)
 {
 }
Beispiel #12
0
 /// <summary>
 /// 判断业务结果类型是否是Error结果
 /// </summary>
 public static bool IsError(this OperationResultType resultType)
 {
     return(resultType == OperationResultType.QueryNull || resultType == OperationResultType.ValidError ||
            resultType == OperationResultType.Error);
 }
Beispiel #13
0
 /// <summary>
 ///     初始化一个 定义返回消息、日志消息与附加数据的业务操作结果信息类 的新实例
 /// </summary>
 /// <param name="resultType">业务操作结果类型</param>
 /// <param name="message">业务返回消息</param>
 /// <param name="logMessage">业务日志记录消息</param>
 /// <param name="appendData">业务返回数据</param>
 public OperationResult(OperationResultType resultType, string message, string logMessage, object appendData)
     : this(resultType, message, logMessage)
 {
     AppendData = appendData;
 }
Beispiel #14
0
 /// <summary>
 ///     初始化一个 业务操作结果信息类 的新实例
 /// </summary>
 /// <param name="resultType">业务操作结果类型</param>
 public OperationResult(OperationResultType resultType)
 {
     ResultType = resultType;
 }
Beispiel #15
0
 /// <summary>
 /// 初始化一个<see cref="OperationResult"/>类型的新实例
 /// </summary>
 public OperationResult(OperationResultType resultType, string message)
     : this(resultType)
 {
     Message = message;
 }
Beispiel #16
0
 public OperationResult(OperationResultType resultType, string message, string logmessage)
     : this(resultType, message)
 {
     this.LogMessage = logmessage;
 }
Beispiel #17
0
 /// <summary>
 /// 初始化一个<see cref="OperationResult"/>类型的新实例
 /// </summary>
 public OperationResult(OperationResultType resultType, string message, object data)
     : this(resultType, message)
 {
     Data = data;
 }
Beispiel #18
0
 public OperationResult(OperationResultType resultType, string message, string logmessage, object data)
     : this(resultType, message, logmessage)
 {
     this.Data = data;
 }
Beispiel #19
0
 /// <summary>
 /// 初始化一个<see cref="ApiResult"/>类型的新实例
 /// </summary>
 public ApiResult(string content, object data = null, OperationResultType type = OperationResultType.Success)
 {
     ReturnCode = type;
     ReturnMsg = content;
     ReturnData = data;
 }
Beispiel #20
0
 public OperationResult(OperationResultType result)
     : this()
 {
     this.Result = result;
 }