private static RedrivePolicy ExtractRedrivePolicyFromQueueAttributes(Dictionary <string, string> queueAttributes) { if (!queueAttributes.ContainsKey(JustSayingConstants.AttributeRedrivePolicy)) { return(null); } return(RedrivePolicy.ConvertFromString(queueAttributes[JustSayingConstants.AttributeRedrivePolicy])); }
private RedrivePolicy ExtractRedrivePolicyFromQueueAttributes(Dictionary <string, string> queueAttributes) { if (!queueAttributes.ContainsKey(JustSayingConstants.ATTRIBUTE_REDRIVE_POLICY)) { return(null); } return(RedrivePolicy.ConvertFromString(queueAttributes[JustSayingConstants.ATTRIBUTE_REDRIVE_POLICY])); }
private static RedrivePolicy ExtractRedrivePolicyFromQueueAttributes(Dictionary <string, string> queueAttributes) { if (!queueAttributes.TryGetValue(JustSayingConstants.AttributeRedrivePolicy, out var redrivePolicy)) { return(null); } return(RedrivePolicy.ConvertFromString(redrivePolicy)); }
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); }