/// <summary>
/// Returns the configured delivery delay by using <see cref="DelayDeliveryWith" />.
/// </summary>
/// <param name="options">The options being extended.</param>
/// <returns>The configured <see cref="TimeSpan" /> or <c>null</c>.</returns>
public static TimeSpan?GetDeliveryDelay(this SendOptions options)
{
Guard.AgainstNull(nameof(options), options);
return((options.DelayedDeliveryConstraint as DelayDeliveryWith)?.Delay);
}