コード例 #1
0
 public ProcessedMessage Map(Data.ProcessedMessage dataMessage)
 {
     return(new ProcessedMessage
     {
         IsSystemMessage = dataMessage.MessageMetadata.IsSystemMessage,
         MessageType = GetMessageType(dataMessage.MessageMetadata.MessageType),
         MessageId = dataMessage.MessageMetadata.MessageId,
         RelatedTo = dataMessage.MessageMetadata.RelatedToId,
         MessageIntent = GetMessageIntent(dataMessage),
         Context = GetContext(dataMessage),
         ReceivingEndpoint = Map(dataMessage.MessageMetadata.ReceivingEndpoint),
         SendingEndpoint = Map(dataMessage.MessageMetadata.SendingEndpoint)
     });
 }
コード例 #2
0
        private string GetContext(Data.ProcessedMessage dataMessage)
        {
            dataMessage.Headers.TryGetValue(contextHeaderName, out var headerValue);

            return(headerValue);
        }