private Task <IResponse> ExecuteAsync(IRequest request, ConnectSetting connectSetting = null) { if (connectSetting == null) { return(RetryPolicy.GetResponse(Extractor, request)); } else { var copyConfig = config.Clone(); copyConfig.Connection = connectSetting; return(new Retry.FixedCountPolicy(connectSetting.AttemptsTimes, connectSetting.RetryIntervalMs) .GetResponse(extractorFactory.CreateExtractor(SimulationEnabled, copyConfig), request)); } }
private Task <IResponse> ExecuteAsync(IRequest request) { return(RetryPolicy.GetResponse(Fetcher, request)); }