public InterventionResult Handle(ResponseContainer offendingTask) { // Build login request HttpRequestMessage loginReq = _client.PrepareLogin(); return(new InterventionResult(InterventionResultState.RetryCurrentTask, loginReq)); }
public InterventionResult Handle(ResponseContainer offendingTask) { if (++_loginRetry > 1) { Logger.Instance.Log(LogLevel.Error, "Login failed!"); return(new InterventionResult(InterventionResultState.Abort)); } // Build login request Logger.Instance.Log(LogLevel.Warning, "Login necessary"); HttpRequestMessage loginReq = _client.PrepareLogin(); return(new InterventionResult(InterventionResultState.RetryCurrentTask, loginReq, () => _client.SaveCookies())); }