Exemple #1
0
 public void Close()
 {
     if (_client == null)
     {
         return;
     }
     try
     {
         /*if (_client.ClientCredentials != null)
          * {
          *  _client.ClientCredentials.UserName.UserName = "******";
          *  _client.ClientCredentials.UserName.Password = "******".Reverse().ToString();
          * }*/
         _client.UnsubscribeFromPasswordChange();
     }
     catch (Exception exception)
     {
         _client?.Abort();
         _client = null;
         Logger?.LogTextMessage($"UnsubscribeFromPasswordChange() - error: {exception.Message}");
         return;
     }
     try
     {
         _client?.Close();
     }
     catch (Exception)
     {
     }
     _client = null;
 }
Exemple #2
0
 public void Close()
 {
     if (_client == null)
     {
         return;
     }
     try
     {
         _client.UnsubscribeFromPasswordChange();
     }
     catch (Exception exception)
     {
         _client.Abort();
         _client = null;
         Logger?.LogTextMessage($"UnsubscribeFromPasswordChange() - error: {exception.Message}");
         return;
     }
     try
     {
         _client.Close();
     }
     catch (Exception)
     {
     }
     _client = null;
 }