Example #1
0
        private ISender BuildSender()
        {
            if (this.httpSender != null)
            {
                return(this.httpSender);
            }

            ISender sender = new NativeSender(this.maxTimeout, this.proxy);

            sender = new StatusCodeSender(sender);

            if (this.signer != null)
            {
                sender = new SigningSender(this.signer, sender);
            }

            sender = new URLPrefixSender(this.urlPrefix, sender);

            if (this.maxRetries > 0)
            {
                sender = new RetrySender(this.maxRetries, sender);
            }

            return(sender);
        }
Example #2
0
        private Task SendRequestAsync(string requestBehavior)
        {
            var request     = new Request(requestBehavior);
            var retrySender = new RetrySender(5, this.mockCrashingSender);

            return(retrySender.SendAsync(request));
        }
Example #3
0
        private void SendRequest(string requestBehavior)
        {
            var request     = new Request(requestBehavior);
            var retrySender = new RetrySender(5, this.mockCrashingSender);

            retrySender.Send(request);
        }
        private async Task SendRequestAsync(string requestBehavior)
        {
            var request = new Request();

            request.SetUrlPrefix(requestBehavior);
            var retrySender = new RetrySender(5, this.mockCrashingSender);

            await retrySender.SendAsync(request);
        }