private void SendInternal(object message, IEnumerable <string> destinations) { OutgoingHeaders[StandardHeaders.ContentType] = MessageSerializer.ContentType; OutgoingHeaders[StandardHeaders.EnclosedMessageTypes] = string.Join(",", MessageMapper.GetEnclosedMessageTypes(message.GetType()).Distinct()); if (currentMessageContext != null) { OutgoingHeaders[StandardHeaders.RelatedTo] = currentMessageContext[StandardHeaders.MessageId]; } var transportMessage = new OutgoingTransportMessage(OutgoingHeaders, message, MessageSerializer.Serialize(message)); this.Transport.Send(transportMessage, destinations); }
public string RequestTimeoutMessage(int secondsToWait, object timeoutMessage) { OutgoingHeaders[StandardHeaders.TimeoutMessageTimeout] = secondsToWait.ToString(); OutgoingHeaders[StandardHeaders.ContentType] = MessageSerializer.ContentType; OutgoingHeaders[StandardHeaders.EnclosedMessageTypes] = string.Join(",", MessageMapper.GetEnclosedMessageTypes(timeoutMessage.GetType()).Distinct()); if (currentMessageContext != null) { OutgoingHeaders[StandardHeaders.RelatedTo] = currentMessageContext[StandardHeaders.MessageId]; } var transportMessage = new OutgoingTransportMessage(OutgoingHeaders, timeoutMessage, MessageSerializer.Serialize(timeoutMessage)); return(this.Transport.RequestTimeoutMessage(secondsToWait, transportMessage)); }