private static RedrivePolicy ExtractRedrivePolicyFromQueueAttributes(Dictionary <string, string> queueAttributes)
 {
     if (!queueAttributes.ContainsKey(JustSayingConstants.AttributeRedrivePolicy))
     {
         return(null);
     }
     return(RedrivePolicy.ConvertFromString(queueAttributes[JustSayingConstants.AttributeRedrivePolicy]));
 }
Beispiel #2
0
 private RedrivePolicy ExtractRedrivePolicyFromQueueAttributes(Dictionary <string, string> queueAttributes)
 {
     if (!queueAttributes.ContainsKey(JustSayingConstants.ATTRIBUTE_REDRIVE_POLICY))
     {
         return(null);
     }
     return(RedrivePolicy.ConvertFromString(queueAttributes[JustSayingConstants.ATTRIBUTE_REDRIVE_POLICY]));
 }
Beispiel #3
0
        private static RedrivePolicy ExtractRedrivePolicyFromQueueAttributes(Dictionary <string, string> queueAttributes)
        {
            if (!queueAttributes.TryGetValue(JustSayingConstants.AttributeRedrivePolicy, out var redrivePolicy))
            {
                return(null);
            }

            return(RedrivePolicy.ConvertFromString(redrivePolicy));
        }
Beispiel #4
0
    public void CanDeserializeIntoRedrivePolicy()
    {
        var policy           = new RedrivePolicy(1, "queue");
        var policySerialized = policy.ToString();

        var outputPolicy = RedrivePolicy.ConvertFromString(policySerialized);

        outputPolicy.MaximumReceives.ShouldBe(policy.MaximumReceives);
        outputPolicy.DeadLetterQueue.ShouldBe(policy.DeadLetterQueue);
    }