Esempio n. 1
0
 public IDevice[] GetDevices()
 {
     UPnPDevice[] deviceArr;
     lock (deviceList)
     {
         deviceArr = new UPnPDevice[deviceList.Count];
         deviceList.Values.CopyTo(deviceArr, 0);
     }
     return deviceArr;
 }
Esempio n. 2
0
 protected virtual void OnDeviceDiscovered(UPnPDevice dev)
 {
     EventHandler<DeviceEventArgs> handler = DeviceDiscovery;
     if (handler != null)
         handler(this, new DeviceEventArgs(dev, DeviceEventArgs.DeviceEventActions.Added));
 }
Esempio n. 3
0
 protected virtual void OnPlaystateChanged(UPnPDevice device, DevicePlaystateEventArgs.DevicePlaystate playstate, int timeOffset)
 {
     EventHandler<DevicePlaystateEventArgs> handler = PlaystateChanged;
     if (handler != null)
         handler(this, new DevicePlaystateEventArgs(device, playstate, timeOffset));
 }