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(); }
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)); }