Ejemplo n.º 1
0
 private void verifyConnection()
 {
     if (NpClient == null || !NpClient.IsConnected)
     {
         if (!NpClient.IsConnected)
         {
             NpClient.Dispose();
             NpClient = null;
         }
         NpClient = new NpClient <IMessageService>(new NpEndPoint(PipeName));
     }
 }
Ejemplo n.º 2
0
            private bool disposedValue = false; // To detect redundant calls

            protected virtual void Dispose(bool disposing)
            {
                if (!disposedValue)
                {
                    if (disposing)
                    {
                        _client.Dispose();
                        _callbackChannel.Close();
                        _callbackChannel.Dispose();
                    }
                    disposedValue = true;
                }
            }
Ejemplo n.º 3
0
 public void Dispose()
 {
     NpClient?.Dispose();
     NpClient = null;
 }