Esempio n. 1
0
 public static void AppendSafeStandardHeaders(Dictionary <string, string> nServiceBusHeaders)
 {
     AdapterUtilities.InvokeIfTrue(() => nServiceBusHeaders[SafeStandardHeaders.ReplyToAddress] = nServiceBusHeaders[Headers.ReplyToAddress],
                                   nServiceBusHeaders.ContainsKey(Headers.ReplyToAddress));
     AdapterUtilities.InvokeIfTrue(() => nServiceBusHeaders[SafeStandardHeaders.OriginatingAddress] = nServiceBusHeaders[Headers.OriginatingEndpoint],
                                   nServiceBusHeaders.ContainsKey(Headers.OriginatingEndpoint));
     AdapterUtilities.InvokeIfTrue(() => nServiceBusHeaders[SafeStandardHeaders.CorrelationId] = nServiceBusHeaders[Headers.CorrelationId],
                                   nServiceBusHeaders.ContainsKey(Headers.CorrelationId));
     AdapterUtilities.InvokeIfTrue(() => nServiceBusHeaders[SafeStandardHeaders.ContentType] = nServiceBusHeaders[Headers.ContentType],
                                   nServiceBusHeaders.ContainsKey(Headers.ContentType));
     AdapterUtilities.InvokeIfTrue(() => nServiceBusHeaders[SafeStandardHeaders.MessageId] = nServiceBusHeaders[Headers.MessageId],
                                   nServiceBusHeaders.ContainsKey(Headers.MessageId));
     AdapterUtilities.InvokeIfTrue(() => nServiceBusHeaders[SafeStandardHeaders.MessageType] = nServiceBusHeaders[Headers.EnclosedMessageTypes],
                                   nServiceBusHeaders.ContainsKey(Headers.EnclosedMessageTypes));
     nServiceBusHeaders[SafeStandardHeaders.TimeSent] = DateTime.UtcNow.ToSafeHeaderValidString();
 }
Esempio n. 2
0
 public static void AppendSafeStandardHeaders(Dictionary <string, string> rebusHeaders)
 {
     AdapterUtilities.InvokeIfTrue(() => rebusHeaders[SafeStandardHeaders.OriginatingAddress] = rebusHeaders[Headers.ReturnAddress],
                                   rebusHeaders.ContainsKey(Headers.ReturnAddress));
     AdapterUtilities.InvokeIfTrue(() => rebusHeaders[SafeStandardHeaders.ReplyToAddress] = rebusHeaders[Headers.SenderAddress],
                                   rebusHeaders.ContainsKey(Headers.SenderAddress));
     AdapterUtilities.InvokeIfTrue(() => rebusHeaders[SafeStandardHeaders.CorrelationId] = rebusHeaders[Headers.CorrelationId],
                                   rebusHeaders.ContainsKey(Headers.CorrelationId));
     AdapterUtilities.InvokeIfTrue(() => rebusHeaders[SafeStandardHeaders.ContentType] = rebusHeaders[Headers.ContentType],
                                   rebusHeaders.ContainsKey(Headers.ContentType));
     AdapterUtilities.InvokeIfTrue(() => rebusHeaders[SafeStandardHeaders.MessageId] = rebusHeaders[Headers.MessageId],
                                   rebusHeaders.ContainsKey(Headers.MessageId));
     AdapterUtilities.InvokeIfTrue(() => rebusHeaders[SafeStandardHeaders.MessageType] = rebusHeaders[Headers.Type],
                                   rebusHeaders.ContainsKey(Headers.Type));
     rebusHeaders[SafeStandardHeaders.TimeSent] = DateTime.UtcNow.ToSafeHeaderValidString();
 }
Esempio n. 3
0
 public static void AppendNServiceBusHeaders(Dictionary <string, string> safeStandardHeaders)
 {
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.ReplyToAddress] = safeStandardHeaders[SafeStandardHeaders.ReplyToAddress],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.ReplyToAddress));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.OriginatingEndpoint] = safeStandardHeaders[SafeStandardHeaders.OriginatingAddress],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.OriginatingAddress));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.CorrelationId] = safeStandardHeaders[SafeStandardHeaders.CorrelationId],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.CorrelationId));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.ContentType] = safeStandardHeaders[SafeStandardHeaders.ContentType],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.ContentType));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.MessageId] = safeStandardHeaders[SafeStandardHeaders.MessageId],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.MessageId));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.EnclosedMessageTypes] = safeStandardHeaders[SafeStandardHeaders.MessageType],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.MessageType));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.TimeSent] = DateTimeExtensions.ToWireFormattedString(safeStandardHeaders[SafeStandardHeaders.TimeSent].ToDatetimeFromSafeHeaderValidString()),
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.TimeSent));
 }
Esempio n. 4
0
 public static void AppendRebusHeaders(Dictionary <string, string> safeStandardHeaders)
 {
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.ReturnAddress] = safeStandardHeaders[SafeStandardHeaders.ReplyToAddress],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.ReplyToAddress));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.SenderAddress] = safeStandardHeaders[SafeStandardHeaders.OriginatingAddress],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.OriginatingAddress));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.CorrelationId] = safeStandardHeaders[SafeStandardHeaders.CorrelationId],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.CorrelationId));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.ContentType] = safeStandardHeaders[SafeStandardHeaders.ContentType],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.ContentType));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.MessageId] = safeStandardHeaders[SafeStandardHeaders.MessageId],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.MessageId));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.Type] = safeStandardHeaders[SafeStandardHeaders.MessageType],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.MessageType));
     AdapterUtilities.InvokeIfTrue(() => safeStandardHeaders[Headers.SentTime] = safeStandardHeaders[SafeStandardHeaders.TimeSent],
                                   safeStandardHeaders.ContainsKey(SafeStandardHeaders.TimeSent));
 }