将以往的代码复制到代码库
This commit is contained in:
56
Future.Contract/Instruction/InstructResult.cs
Normal file
56
Future.Contract/Instruction/InstructResult.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Future.Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// 用于封装统一过程调用结果回执
|
||||
/// </summary>
|
||||
public class InstructResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 用于创建过程调用回执
|
||||
/// </summary>
|
||||
/// <param name="instLabel">指令编号</param>
|
||||
/// <param name="receipt">调用回执,默认为[ResultE.Normal]</param>
|
||||
/// <param name="result">调用结果,默认为[null]</param>
|
||||
/// <param name="message">告警消息,默认为[""]</param>
|
||||
/// <param name="exeption">崩溃异常,默认为[null]</param>
|
||||
public InstructResult(string instLabel,EInstructReceipt receipt= EInstructReceipt.Normal, object result=null, string message="", Exception exeption=null)
|
||||
{
|
||||
this.InstLabel = instLabel;
|
||||
this.Receipt = receipt;
|
||||
this.Return = result;
|
||||
this.Message = message;
|
||||
this.Exception = exeption;
|
||||
}
|
||||
/// <summary>
|
||||
/// 指令序列标号,用于在日志与指令序列相对照
|
||||
/// </summary>
|
||||
public string InstLabel { get; set; }
|
||||
/// <summary>
|
||||
/// 过程调用回执,指示调用方的后续工作行为
|
||||
/// </summary>
|
||||
public EInstructReceipt Receipt { get; set; }
|
||||
/// <summary>
|
||||
/// 信息输出位置,用于指示报告生成器或是态势感知器的行为
|
||||
/// </summary>
|
||||
public EInstructOutput Postion { get; set; }
|
||||
/// <summary>
|
||||
/// 过程调用结果,如果返回数据则存储于此属性
|
||||
/// </summary>
|
||||
public object Return { get; set; }
|
||||
/// <summary>
|
||||
/// 如果发生告警,则告警信息存储于此属性
|
||||
/// </summary>
|
||||
public String Message { get; set; }
|
||||
/// <summary>
|
||||
/// 如果发生崩溃,则异常信息存储于此属性
|
||||
/// </summary>
|
||||
public Exception Exception { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user