示例#1
0
        public ClientService()
        {
            Uri address = new Uri("http://localhost:4000/IManagerComand");  // ADDRESS.   (A)

            // Указание, как обмениваться сообщениями.
            BasicHttpBinding binding = new BasicHttpBinding();         // BINDING.   (B)

            // Создание Конечной Точки.
            EndpointAddress endpoint = new EndpointAddress(address);

            // Создание фабрики каналов.
            ChannelFactory <IRemoteVideoCommand> factory = new ChannelFactory <IRemoteVideoCommand>(binding, endpoint);  // CONTRACT.  (C)

            // Использование factory для создания канала (прокси).
            channel = factory.CreateChannel();
        }