public void Dispose() { log.Info("Disposing of service proxy"); if (client != null) { try { client.Unsubscribe(); } catch (Exception) { } finally { client = null; } } ; if (clientFactory != null) { try { clientFactory.Close(); } catch (Exception) { } finally { clientFactory = null; } } }
public void Activate() { log.InfoFormat("Activating hardware subscription [{0}]", RemoteFactory.PipeLocation); clientFactory = RemoteFactory.CreateClientFactory(this); client = clientFactory.CreateChannel(); client.Subscribe(); }