Ejemplo n.º 1
0
 public IDevice[] GetDevices()
 {
     UPnPDevice[] deviceArr;
     lock (deviceList)
     {
         deviceArr = new UPnPDevice[deviceList.Count];
         deviceList.Values.CopyTo(deviceArr, 0);
     }
     return deviceArr;
 }
Ejemplo n.º 2
0
 protected virtual void OnDeviceDiscovered(UPnPDevice dev)
 {
     EventHandler<DeviceEventArgs> handler = DeviceDiscovery;
     if (handler != null)
         handler(this, new DeviceEventArgs(dev, DeviceEventArgs.DeviceEventActions.Added));
 }
Ejemplo 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));
 }