コード例 #1
0
ファイル: BusServer.cs プロジェクト: wasabii/rnet
 public BusServer(string udn, string friendlyName, string manufacturer, string modelName, Bus bus)
 {
     server = new Server(new Root(DeviceType, udn, friendlyName, manufacturer, modelName,
         new DeviceOptions()
         {
             Services = new[]
             {
                 new Service<Bus>(Bus.ServiceType, "urn:tempuri-org:serviceId:Bus", this.bus = bus),
             },
         }));
 }
コード例 #2
0
ファイル: LightServer.cs プロジェクト: wasabii/mono-upnp
        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));
        }