public static AmazonSQSClient Build(SqsQueueTriggerAttribute triggerParameters)
 {
     return(AmazonSQSClientFactory.Build(
                queueUrl: triggerParameters.QueueUrl,
                awsKeyId: triggerParameters.AWSKeyId,
                awsAccessKey: triggerParameters.AWSAccessKey));
 }
 private SqsQueueTriggerAttribute ResolveTriggerParameters(SqsQueueTriggerAttribute triggerAttribute)
 {
     return(new SqsQueueTriggerAttribute
     {
         AWSKeyId = this.Resolve(triggerAttribute.AWSKeyId),
         AWSAccessKey = this.Resolve(triggerAttribute.AWSAccessKey),
         QueueUrl = this.Resolve(triggerAttribute.QueueUrl),
     });
 }
        private SqsQueueTriggerAttribute ResolveTriggerParameters(SqsQueueTriggerAttribute triggerAttribute)
        {
            var resolvedAttribute = new SqsQueueTriggerAttribute
            {
                AWSKeyId     = Resolve(triggerAttribute.AWSKeyId),
                AWSAccessKey = Resolve(triggerAttribute.AWSAccessKey),
                QueueUrl     = Resolve(triggerAttribute.QueueUrl)
            };

            return(resolvedAttribute);
        }
        public SqsQueueTriggerListener(SqsQueueTriggerAttribute triggerParameters, IOptions <SqsQueueOptions> sqsQueueOptions, ITriggeredFunctionExecutor executor)
        {
            this.Executor          = executor;
            this.SqsQueueOptions   = sqsQueueOptions;
            this.TriggerParameters = triggerParameters;

            this.SqsQueueOptions.Value.MaxNumberOfMessages = this.SqsQueueOptions.Value.MaxNumberOfMessages ?? 5;
            this.SqsQueueOptions.Value.PollingInterval     = this.SqsQueueOptions.Value.PollingInterval ?? TimeSpan.FromSeconds(5);
            this.SqsQueueOptions.Value.VisibilityTimeout   = this.SqsQueueOptions.Value.VisibilityTimeout ?? TimeSpan.FromSeconds(5);

            this.AmazonSQSClient = AmazonSQSClientFactory.Build(triggerParameters);
        }
Exemplo n.º 5
0
 public SqsQueueTriggerBinding(ParameterInfo parameterInfo, SqsQueueTriggerAttribute triggerParameters, IOptions <SqsQueueOptions> sqsQueueOptions)
 {
     this.SqsQueueOptions   = sqsQueueOptions;
     this.ParameterInfo     = parameterInfo;
     this.TriggerParameters = triggerParameters;
 }