Example #1
0
 public void BindConnectionEvent()
 {
     currConnection.CallbackException += (sender, e) =>
     {
         connectionStatus.OnError(null, e.Exception);
     };
     currConnection.ConnectionBlocked += (sender, e) =>
     {
         if (connectionStatus != null)
         {
             //connStatus.OnDisconnected();
         }
     };
     currConnection.ConnectionRecoveryError += (sender, e) =>
     {
         if (connectionStatus != null)
         {
             connectionStatus.OnError((AutorecoveringConnection)sender, e.Exception);
         }
     };
     currConnection.ConnectionShutdown += (sender, e) =>
     {
         if (connectionStatus != null)
         {
             connectionStatus.OnClosed((Connection)sender, e.ReplyCode, e.ReplyText);
         }
     };
     currConnection.RecoverySucceeded += (sender, e) =>
     {
         if (connectionStatus != null)
         {
             connectionStatus.OnReconnected((AutorecoveringConnection)sender);
         }
     };
     currConnection.ConnectionUnblocked += (sender, e) =>
     {
         if (connectionStatus != null)
         {
             //connStatus.OnSuccess();
         }
     };
 }