Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            light = new Light();
            server = new LightServer("uuid:" + Guid.NewGuid(), "Light Bulb", "Jerome", "MagicLight", light);
            server.Start();

            t = new Thread(ThreadMain);
            t.Start();

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        public LightServer(string udn, string friendlyName, string manufacturer, string modelName, Light light)
        {
            options = new DeviceOptions()
            {
                Services = new Service[]
                {
                    new Service<Light>(Light.ServiceType, "urn:ls-net:serviceId:Light", this.light = light),
                },
            };

            this.server = new Server(new Root(DeviceType, udn, friendlyName, manufacturer, modelName, options));
        }