Esempio n. 1
0
 /// <summary>
 /// 消息执行结果
 /// </summary>
 /// <param name="status">状态</param>
 /// <param name="rawMessage">原始消息</param>
 /// <param name="subscriber">订阅者</param>
 /// <param name="result">结果数据</param>
 /// <param name="resultType">结果数据类型</param>
 /// <param name="stackTrace">堆栈跟踪信息</param>
 public MessageExecutingResult(MessageExecutingStatus status, IMessage rawMessage, string subscriber,
                               string result = null, string resultType = null, string stackTrace = null)
 {
     Status     = status;
     RawMessage = rawMessage;
     Subscriber = subscriber;
     Result     = result;
     ResultType = resultType;
     StackTrace = stackTrace;
 }
Esempio n. 2
0
 private async Task CompleteMessageAsync(string subscriber, ProcessingMessage processingMessage, MessageExecutingStatus commandStatus, string resultType, string result, string stackTrace = null)
 {
     var commandResult = new MessageExecutingResult(commandStatus, processingMessage.Message, subscriber, result, resultType, stackTrace);
     await processingMessage.CompleteAsync(commandResult).ConfigureAwait(false);
 }