Exemple #1
0
        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;
                }
            }
        }
Exemple #2
0
 public void Activate()
 {
     log.InfoFormat("Activating hardware subscription [{0}]", RemoteFactory.PipeLocation);
     clientFactory = RemoteFactory.CreateClientFactory(this);
     client        = clientFactory.CreateChannel();
     client.Subscribe();
 }