示例#1
0
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.ReplaceHandler <Amazon.Runtime.Internal.ErrorHandler>(new Amazon.Runtime.Internal.ErrorHandler <AmazonCognitoSyncException>(this.Logger));
     pipeline.RemoveHandler <Amazon.Runtime.Internal.CredentialsRetriever>();
     pipeline.AddHandlerBefore <Amazon.Runtime.Internal.Marshaller>(new Amazon.CognitoSync.Internal.CognitoCredentialsRetriever(this.Credentials));
     pipeline.AddHandlerAfter <Amazon.Runtime.Internal.Marshaller>(new Amazon.CognitoSync.Internal.AmazonCognitoSyncPostMarshallHandler());
     pipeline.AddHandlerAfter <Amazon.Runtime.Internal.Signer>(new Amazon.CognitoSync.Internal.AmazonCognitoSyncPostSignHandler());
 }
        public void AddHandlerAfterTest()
        {
            var handlerC = new TestHandlerC();
            var pipeline = new RuntimePipeline(handlerC);
            var handlerA = new TestHandlerA();
            // A->C
            pipeline.AddHandler(handlerA);
            var handlerB = new TestHandlerB();
            // A->B->C
            pipeline.AddHandlerAfter<TestHandlerA>(handlerB);
            ValidatePipeline(pipeline, handlerA, handlerB, handlerC);

            var handlerD = new TestHandlerD();
            // A->B->C->D
            pipeline.AddHandlerAfter<TestHandlerC>(handlerD);
            ValidatePipeline(pipeline, handlerA, handlerB, handlerC, handlerD);
        }
示例#3
0
        /// <summary>
        /// Customize the pipeline to allow encryption.
        /// </summary>
        /// <param name="pipeline"></param>
        protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
        {
            base.CustomizeRuntimePipeline(pipeline);

            pipeline.AddHandlerBefore <Amazon.Runtime.Internal.Marshaller>(new Amazon.S3.Encryption.Internal.SetupEncryptionHandler(this));
            pipeline.AddHandlerAfter <Amazon.Runtime.Internal.Marshaller>(new Amazon.S3.Encryption.Internal.UserAgentHandler());
            pipeline.AddHandlerBefore <Amazon.S3.Internal.AmazonS3ResponseHandler>(new Amazon.S3.Encryption.Internal.SetupDecryptionHandler(this));
        }
        public void Customize(Type serviceClientType, RuntimePipeline pipeline)
        {
            if (serviceClientType.BaseType != typeof(AmazonServiceClient))
            {
                return;
            }

            pipeline.AddHandlerAfter <EndpointResolver>(new AWSTracingPipelineHandler(this.options));
        }
        /// <summary>
        /// This method is called whenever an AWS service client is instantiated.
        /// </summary>
        /// <param name="serviceClientType"></param>
        /// <param name="pipeline"></param>
        public void Customize(Type serviceClientType, RuntimePipeline pipeline)
        {
            if (serviceClientType.BaseType != typeof(AmazonServiceClient))
            {
                return;
            }

            pipeline.AddHandlerAfter <EndpointResolver>(new ProfilePipelineHandler());
        }
        public void AddHandlerAfterTest()
        {
            var handlerC = new TestHandlerC();
            var pipeline = new RuntimePipeline(handlerC);
            var handlerA = new TestHandlerA();

            // A->C
            pipeline.AddHandler(handlerA);
            var handlerB = new TestHandlerB();

            // A->B->C
            pipeline.AddHandlerAfter <TestHandlerA>(handlerB);
            ValidatePipeline(pipeline, handlerA, handlerB, handlerC);

            var handlerD = new TestHandlerD();

            // A->B->C->D
            pipeline.AddHandlerAfter <TestHandlerC>(handlerD);
            ValidatePipeline(pipeline, handlerA, handlerB, handlerC, handlerD);
        }
示例#7
0
        public void Customize(Type serviceClientType, RuntimePipeline pipeline)
        {
            if (serviceClientType.BaseType != typeof(AmazonServiceClient))
            {
                return;
            }

            bool addCustomization = _option.RegisterAll;

            if (!addCustomization)
            {
                addCustomization = ProcessType(serviceClientType, addCustomization);
            }

            var handler1 = _serviceProvider.GetRequiredService <ApplicationInsightsPipelineHandler>();

            pipeline.AddHandlerAfter <EndpointResolver>(handler1);

            var handler2 = _serviceProvider.GetRequiredService <ApplicationInsightsExceptionsPipelineHandler>();

            pipeline.AddHandlerAfter <RetryHandler>(handler2);
        }
示例#8
0
 /// <summary>
 /// Customizes the runtime pipeline.
 /// </summary>
 /// <param name="pipeline">Runtime pipeline for the current client.</param>
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter <Amazon.Runtime.Internal.Marshaller>(new Amazon.S3Control.Internal.AmazonS3ControlPostMarshallHandler());
     pipeline.AddHandlerBefore <Amazon.Runtime.Internal.Unmarshaller>(new Amazon.S3Control.Internal.AmazonS3ControlPostUnmarshallHandler());
     pipeline.AddHandlerAfter <Amazon.Runtime.Internal.ErrorCallbackHandler>(new Amazon.S3Control.Internal.AmazonS3ControlExceptionHandler());
 }
 /// <summary>
 /// Customizes the runtime pipeline.
 /// </summary>
 /// <param name="pipeline">Runtime pipeline for the current client.</param>
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.MachineLearning.Internal.ProcessRequestHandler());
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Marshaller>(new Amazon.MachineLearning.Internal.IdempotencyHandler());
 }
示例#10
0
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter <Amazon.Runtime.Internal.Marshaller>(new Amazon.CloudSearchDomain.Internal.ProcessRequestHandler());
     pipeline.AddHandlerBefore <Amazon.Runtime.Internal.Unmarshaller>(new Amazon.CloudSearchDomain.Internal.ValidationResponseHandler());
     pipeline.AddHandlerBefore <Amazon.Runtime.Internal.Unmarshaller>(new Amazon.CloudSearchDomain.Internal.ProcessExceptionHandler());
 }
示例#11
0
 /// <summary>
 /// Customizes the runtime pipeline.
 /// </summary>
 /// <param name="pipeline">Runtime pipeline for the current client.</param>
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter <Amazon.Runtime.Internal.Marshaller>(new Amazon.CloudFormation.Internal.ProcessRequestHandler());
 }
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.ReplaceHandler<Amazon.Runtime.Internal.ErrorHandler>(new Amazon.Runtime.Internal.ErrorHandler<AmazonSQSException>(this.Logger));
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.SQS.Internal.ProcessRequestHandler());
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Unmarshaller>(new Amazon.SQS.Internal.ValidationResponseHandler());
 }    
 /// <summary>
 /// Customizes the runtime pipeline.
 /// </summary>
 /// <param name="pipeline">Runtime pipeline for the current client.</param>
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.ElasticLoadBalancing.Internal.ProcessRequestHandler());
 }
示例#14
0
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter <Amazon.Runtime.Internal.Marshaller>(new Amazon.Route53.Internal.AmazonRoute53PostMarshallHandler());
 }
示例#15
0
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.ReplaceHandler<Amazon.Runtime.Internal.ErrorHandler>(new Amazon.Runtime.Internal.ErrorHandler<AmazonS3Exception>(this.Logger));
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Marshaller>(new Amazon.S3.Internal.AmazonS3PreMarshallHandler());
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.S3.Internal.AmazonS3PostMarshallHandler());
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.EndpointResolver>(new Amazon.S3.Internal.AmazonS3KmsHandler());
 }    
        protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
        {
            base.CustomizeRuntimePipeline(pipeline);

            pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Marshaller>(new Amazon.S3.Encryption.Internal.SetupEncryptionHandler(this));
            pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.S3.Encryption.Internal.UserAgentHandler());
            pipeline.AddHandlerBefore<Amazon.S3.Internal.AmazonS3ResponseHandler>(new Amazon.S3.Encryption.Internal.SetupDecryptionHandler(this));
        }  
示例#17
0
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Marshaller>(new Amazon.S3.Internal.AmazonS3PreMarshallHandler());
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.S3.Internal.AmazonS3PostMarshallHandler());
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Unmarshaller>(new Amazon.S3.Internal.AmazonS3ResponseHandler());
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.ErrorCallbackHandler>(new Amazon.S3.Internal.AmazonS3ExceptionHandler());
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.ErrorHandler>(new Amazon.Runtime.Internal.RedirectHandler());
 }    
 /// <summary>
 /// Customize the pipeline
 /// </summary>
 /// <param name="pipeline"></param>
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Marshaller>(new Amazon.EC2.Internal.AmazonEC2PreMarshallHandler(this.Credentials));
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.EC2.Internal.AmazonEC2PostMarshallHandler());
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Unmarshaller>(new Amazon.EC2.Internal.AmazonEC2ResponseHandler());
 }    
 /// <summary>
 /// Customizes the runtime pipeline.
 /// </summary>
 /// <param name="pipeline">Runtime pipeline for the current client.</param>
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.CloudFormation.Internal.ProcessRequestHandler());
 }
示例#20
0
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter<Marshaller>(new ResponseValidationHandler());
 }
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.CloudSearchDomain.Internal.ProcessRequestHandler());
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Unmarshaller>(new Amazon.CloudSearchDomain.Internal.ValidationResponseHandler());
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Unmarshaller>(new Amazon.CloudSearchDomain.Internal.ProcessExceptionHandler());
 }    
示例#22
0
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter <Marshaller>(new ResponseValidationHandler());
 }
示例#23
0
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Marshaller>(new Amazon.S3.Internal.AmazonS3PreMarshallHandler());
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.S3.Internal.AmazonS3PostMarshallHandler());
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.EndpointResolver>(new Amazon.S3.Internal.AmazonS3KmsHandler());
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Unmarshaller>(new Amazon.S3.Internal.AmazonS3ResponseHandler());
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.ErrorCallbackHandler>(new Amazon.S3.Internal.AmazonS3ExceptionHandler());
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Unmarshaller>(new Amazon.S3.Internal.AmazonS3RedirectHandler());
     pipeline.ReplaceHandler<Amazon.Runtime.Internal.RetryHandler>(new Amazon.Runtime.Internal.RetryHandler(new Amazon.S3.Internal.AmazonS3RetryPolicy(this.Config.MaxErrorRetry)));
 }
 /// <summary>
 /// Customize the pipeline
 /// </summary>
 /// <param name="pipeline"></param>
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.Route53.Internal.AmazonRoute53PostMarshallHandler());
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.ErrorCallbackHandler>(new Amazon.Route53.Internal.AmazonRoute53PreMarshallHandler());
 }    
 protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
 {
     pipeline.ReplaceHandler<Amazon.Runtime.Internal.ErrorHandler>(new Amazon.Runtime.Internal.ErrorHandler<AmazonCognitoSyncException>(this.Logger));
     pipeline.RemoveHandler<Amazon.Runtime.Internal.CredentialsRetriever>();
     pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Marshaller>(new Amazon.CognitoSync.Internal.CognitoCredentialsRetriever(this.Credentials));
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.CognitoSync.Internal.AmazonCognitoSyncPostMarshallHandler());
     pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Signer>(new Amazon.CognitoSync.Internal.AmazonCognitoSyncPostSignHandler());
 }    
示例#26
0
 public void Customize(Type serviceClientType, RuntimePipeline pipeline)
 {
     pipeline.AddHandlerAfter <EndpointResolver>(new SQSXRayPipelineHandler());
 }