public void Stop() { _eventListener.Stop(); _eventListener?.Dispose(); _connection?.Dispose(); _serviceNowPassword?.Dispose(); _validator?.Dispose(); _eventListener = null; _connection = null; _serviceNowPassword = null; _validator = null; }
private void StopMonitoring() { try { _eventListener?.Stop(); _a2aContext?.Dispose(); _logger.Information("Password change monitoring has been stopped."); } finally { _eventListener = null; _a2aContext = null; _retrievableAccounts = null; } }