private void AbortPollingUpdates() { _updatesPollingTimer.Change(Timeout.Infinite, Timeout.Infinite); var errorMessage = $"Fake Bot API Poller updates polling stopped, the Fake Bot API Client ({_botApiClient.ComponentState.FooBar()}) cannot be consumed."; ComponentState = BotApiComponentState.CreateError(errorMessage); _logger.LogError(errorMessage); }
public override void RegisterPoller() { if (_botApiClient.CanConsumeOperationalClient) { _updatesPollingTimer.Change(TimeSpan.Zero, _timerInterval); ComponentState = BotApiComponentState.CreateRegistered(); _logger.LogInformation("Fake Bot API Poller registered."); } else { var errorMessage = $"Fake Bot API Poller registration failed, the Fake Bot API Client ({_botApiClient.ComponentState.FooBar()}) cannot be consumed."; ComponentState = BotApiComponentState.CreateError(errorMessage); _logger.LogError(errorMessage); } }
private void HandleClientInitializationFailed(string errorStateDescription, string errorMessage) { OperationalClient = null; ComponentState = BotApiComponentState.CreateError(errorStateDescription); _logger.LogError(errorMessage); }