private void ProxyCheck(Request request) { if (this.UseProxies && this.master.ProxyRepository != null) { //TODO I don't think this is actually checking if the proxy has failed this session. And it should check that. if (this.proxy == null || !this.proxy.AvailableForUse || (request.ProxyFilter != null && !this.proxy.MatchesFilter(request.ProxyFilter))) { this.proxy?.Discard(); this.proxy = this.master.ProxyRepository.GetProxy(request.ProxyFilter); } } }
public Response(Request request, string body = null, Exception exception = null, ProxyModel.Proxy proxy = null) { this.Request = request; this.Body = body; this.Exception = exception; this.Proxy = proxy; }