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); }
private Task SendRequestAsync(string requestBehavior) { var request = new Request(requestBehavior); var retrySender = new RetrySender(5, this.mockCrashingSender); return(retrySender.SendAsync(request)); }
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); }