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) }); }
private string GetContext(Data.ProcessedMessage dataMessage) { dataMessage.Headers.TryGetValue(contextHeaderName, out var headerValue); return(headerValue); }