Example #1
0
        static void InnerSetDeferHeaders(DateTimeOffset approximateDeliveryTime, Dictionary<string, string> headers, string destinationAddress)
        {
            headers[Headers.DeferredUntil] = approximateDeliveryTime.ToIso8601DateTimeOffset();

            // do not overwrite the recipient if it has been set
            if (!headers.ContainsKey(Headers.DeferredRecipient))
            {
                headers[Headers.DeferredRecipient] = destinationAddress;
            }
        }
Example #2
0
 /// <summary>
 /// Sets the <see cref="Headers.DeferredUntil"/> header to the specified time
 /// </summary>
 public static void SetDeferHeader(this Message message, DateTimeOffset approximateDeliveryTime)
 {
     message.Headers[Headers.DeferredUntil] = approximateDeliveryTime.ToIso8601DateTimeOffset();
 }
Example #3
0
 static void InnerSetDeferHeader(DateTimeOffset approximateDeliveryTime, Dictionary<string, string> headers)
 {
     headers[Headers.DeferredUntil] = approximateDeliveryTime.ToIso8601DateTimeOffset();
 }