public DeviceService( ISystemEventsService systemEventsService, ISystemInformationService systemInformationService) { if (systemEventsService == null) { throw new ArgumentNullException(nameof(systemEventsService)); } if (systemInformationService == null) { throw new ArgumentNullException(nameof(systemInformationService)); } systemEventsService.StartupCompleted += (s, e) => { systemInformationService.Set("Devices/Count", _devices.GetAll().Count); }; }
public IList <TDevice> Devices <TDevice>() where TDevice : IDevice { return(_devices.GetAll <TDevice>()); }