Exemplo n.º 1
0
        private void OpenChannel()
        {
            DuplexChannelFactory <IControlActiveSettingsSubscriber> factory = new DuplexChannelFactory <IControlActiveSettingsSubscriber>(
                new InstanceContext(instance),
                new NetTcpBinding(),
                new EndpointAddress("net.tcp://localhost:10012/IControlActiveSettingsSubscriber"));

            try
            {
                proxy = factory.CreateChannel();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }