コード例 #1
0
 private static RedrivePolicy ExtractRedrivePolicyFromQueueAttributes(Dictionary <string, string> queueAttributes)
 {
     if (!queueAttributes.ContainsKey(JustSayingConstants.AttributeRedrivePolicy))
     {
         return(null);
     }
     return(RedrivePolicy.ConvertFromString(queueAttributes[JustSayingConstants.AttributeRedrivePolicy]));
 }
コード例 #2
0
ファイル: SqsQueueBase.cs プロジェクト: elmore/JustSaying
 private RedrivePolicy ExtractRedrivePolicyFromQueueAttributes(Dictionary <string, string> queueAttributes)
 {
     if (!queueAttributes.ContainsKey(JustSayingConstants.ATTRIBUTE_REDRIVE_POLICY))
     {
         return(null);
     }
     return(RedrivePolicy.ConvertFromString(queueAttributes[JustSayingConstants.ATTRIBUTE_REDRIVE_POLICY]));
 }
コード例 #3
0
        private static RedrivePolicy ExtractRedrivePolicyFromQueueAttributes(Dictionary <string, string> queueAttributes)
        {
            if (!queueAttributes.TryGetValue(JustSayingConstants.AttributeRedrivePolicy, out var redrivePolicy))
            {
                return(null);
            }

            return(RedrivePolicy.ConvertFromString(redrivePolicy));
        }
コード例 #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);
    }