void ServiceClientBeforeRequestEvent(object sender, RequestEventArgs e)
        {
            Amazon.Runtime.WebServiceRequestEventArgs args = e as Amazon.Runtime.WebServiceRequestEventArgs;
            if (args == null || !args.Headers.ContainsKey(UserAgentHeader))
            {
                return;
            }

            args.Headers[UserAgentHeader] = args.Headers[UserAgentHeader] + " AWSLogger/" + _logType;
        }
        void DynamoDBSessionStateStore_BeforeRequestEvent(object sender, RequestEventArgs e)
        {
            Amazon.Runtime.WebServiceRequestEventArgs args = e as Amazon.Runtime.WebServiceRequestEventArgs;
            if (args == null || !args.Headers.ContainsKey(UserAgentHeader))
            {
                return;
            }

            args.Headers[UserAgentHeader] = args.Headers[UserAgentHeader] + " SessionStateProvider";
        }
Esempio n. 3
0
        internal static void ServiceClientBeforeRequestEvent(object sender, RequestEventArgs e)
        {
            Amazon.Runtime.WebServiceRequestEventArgs args = e as Amazon.Runtime.WebServiceRequestEventArgs;
            if (args == null || !args.Headers.ContainsKey(UserAgentHeader))
            {
                return;
            }

            args.Headers[UserAgentHeader] = args.Headers[UserAgentHeader] + " AWSDotNetCognito/" + "0.9.0";
        }
 internal static WebServiceRequestEventArgs Create(IRequest request)
 {
     WebServiceRequestEventArgs args = new WebServiceRequestEventArgs
     {
         Headers = request.Headers,
         Parameters = request.Parameters,
         ServiceName = request.ServiceName,
         Request = request.OriginalRequest,
         Endpoint = request.Endpoint
     };
     return args;
 }
Esempio n. 5
0
        internal static WebServiceRequestEventArgs Create(IRequest request)
        {
            WebServiceRequestEventArgs args = new WebServiceRequestEventArgs
            {
                Headers     = request.Headers,
                Parameters  = request.Parameters,
                ServiceName = request.ServiceName,
                Request     = request.OriginalRequest,
                Endpoint    = request.Endpoint
            };

            return(args);
        }
        protected void ProcessRequestHandlers(IExecutionContext executionContext)
        {
            IRequest request = executionContext.RequestContext.Request;
            WebServiceRequestEventArgs webServiceRequestEventArgs = WebServiceRequestEventArgs.Create(request);

            if (request.OriginalRequest != null)
            {
                request.OriginalRequest.FireBeforeRequestEvent(this, webServiceRequestEventArgs);
            }
            if (mBeforeRequestEvent != null)
            {
                mBeforeRequestEvent(this, webServiceRequestEventArgs);
            }
        }
        internal static void ServiceClientBeforeRequestEvent(object sender, RequestEventArgs e)
        {
            Amazon.Runtime.WebServiceRequestEventArgs args = e as Amazon.Runtime.WebServiceRequestEventArgs;
            if (args == null || !args.Headers.ContainsKey(UserAgentHeader))
            {
                return;
            }

            var metric = " AWSDotNetCognito/" + GetAssemblyFileVersion();

            if (!args.Headers[UserAgentHeader].Contains(metric))
            {
                args.Headers[UserAgentHeader] = args.Headers[UserAgentHeader] + metric;
            }
        }
Esempio n. 8
0
        internal static WebServiceRequestEventArgs Create(IRequest request)
        {
            WebServiceRequestEventArgs args = new WebServiceRequestEventArgs
            {
                Headers = request.Headers,
#pragma warning disable CS0618 // Type or member is obsolete
                Parameters = request.Parameters,
#pragma warning restore CS0618 // Type or member is obsolete
                ParameterCollection = request.ParameterCollection,
                ServiceName         = request.ServiceName,
                Request             = request.OriginalRequest,
                Endpoint            = request.Endpoint
            };

            return(args);
        }
Esempio n. 9
0
        protected virtual void ProcessRequestHandlers(IRequest request)
        {
            if (request == null)
            {
                throw new ArgumentNullException("request");
            }

            WebServiceRequestEventArgs args = WebServiceRequestEventArgs.Create(request);

            if (request.OriginalRequest != null)
            {
                request.OriginalRequest.FireBeforeRequestEvent(this, args);
            }

            if (BeforeRequestEvent != null)
            {
                BeforeRequestEvent(this, args);
            }
        }
        protected virtual void ProcessRequestHandlers(IRequest request)
        {
            if (request == null)
            {
                return;
            }

            WebServiceRequestEventArgs args = WebServiceRequestEventArgs.Create(request);

            if (request.OriginalRequest != null)
            {
                request.OriginalRequest.FireBeforeRequestEvent(this, args);
            }

            if (BeforeRequestEvent != null)
            {
                BeforeRequestEvent(this, args);
            }
        }
        private void ProcessRequestHandlers <X>(IRequest <X> request) where X : AmazonWebServiceRequest
        {
            if (request == null)
            {
                throw new ArgumentNullException("request");
            }

            WebServiceRequestEventArgs args = WebServiceRequestEventArgs.Create(request);

            if (request.OriginalRequest != null)
            {
                request.OriginalRequest.FireBeforeRequestEvent(this, args);
            }

            if (BeforeRequestEvent != null)
            {
                BeforeRequestEvent(this, args);
            }
        }