public static ConnectionSettings KeepReconnectingWithAlerts(this ConnectionSettingsBuilder settings, TimeSpan alertAfterReconnectingFor)
        {
            var alerter = new ReconnectionAlerterBuilder()
                .WithTimeout(alertAfterReconnectingFor)
                .Build();

            return settings
                .OnConnected(_ => alerter.HandleConnected())
                .OnReconnecting(_ => alerter.HandleReconnecting())
                .KeepReconnecting();
        }
        static void Main(string[] args)
        {
            var connectionHandler = new
                ReconnectionAlerterBuilder()
                .WithTimeout(TimeSpan.FromSeconds(5))
                .Build();

            connectionHandler.HandleConnected();

            while (!Console.KeyAvailable)
            {
                Console.WriteLine("Attempting Reconnect");
                connectionHandler.HandleReconnecting();
                Thread.Sleep(1000);
            }

            Console.WriteLine("Connection Successful");
            connectionHandler.HandleConnected();
            Console.ReadKey();
            Console.ReadKey();
        }