예제 #1
0
        public void Connect(string host)
        {
            var binding = new System.ServiceModel.BasicHttpBinding();
            var address = new System.ServiceModel.EndpointAddress("http://" + host + ":49153/upnp/control/basicevent1");
            var client = new BasicServicePortTypeClient(binding, address);
            var device = new WeMoDevice(this, client, (_devices.Count + 1).ToString());

            _devices.Add(device);
        }
예제 #2
0
        public void Connect(string host)
        {
            var binding = new System.ServiceModel.BasicHttpBinding();
            var address = new System.ServiceModel.EndpointAddress("http://" + host + ":49153/upnp/control/basicevent1");
            var client  = new BasicServicePortTypeClient(binding, address);
            var device  = new WeMoDevice(this, client, (_devices.Count + 1).ToString());

            _devices.Add(device);
        }
예제 #3
0
 public WeMoSwitch(string ip, int port)
 {
     _client = new BasicServicePortTypeClient();
     _client.Endpoint.Address = new EndpointAddress($"http://{ip}:{port}/upnp/control/basicevent1");
 }
예제 #4
0
 public WeMoDevice(WeMoNetwork network, BasicServicePortTypeClient client, string address)
     : base(network, DeviceType.BinarySwitch)
 {
     Address       = address;
     _binarySwitch = new WeMoBinarySwitch(client);
 }
예제 #5
0
 public WeMoBinarySwitch(BasicServicePortTypeClient client)
 {
     _client = client;
 }
예제 #6
0
파일: WeMoDevice.cs 프로젝트: Mavtak/roomie
 public WeMoDevice(WeMoNetwork network, BasicServicePortTypeClient client, string address)
     : base(network, DeviceType.BinarySwitch)
 {
     Address = address;
     _binarySwitch = new WeMoBinarySwitch(client);
 }
예제 #7
0
파일: Class1.cs 프로젝트: Cobster/WeMo
 public WeMoSwitch(string ip, int port)
 {
     _client = new BasicServicePortTypeClient();
     _client.Endpoint.Address = new EndpointAddress($"http://{ip}:{port}/upnp/control/basicevent1");
 }
예제 #8
0
 public WeMoBinarySwitch(BasicServicePortTypeClient client)
 {
     _client = client;
 }