Exemple #1
0
        public IRControlService(IIRSlingerCsharp irService, IACDeviceService acDeviceService, IHostDeviceService hostDeviceService)
        {
            _irService = irService;

            _currentAcDevice = acDeviceService.GetCurrentDevice();
            _hostDevice      = hostDeviceService.GetCurrentDevice();
        }
        public IRaspberryPiDevice GetCurrentDevice()
        {
            if (_currentDevice != null)
            {
                return(_currentDevice);
            }
            _currentDevice = _raspberryPiDeviceRepository.CurrentDevice;

            if (_currentDevice == null)
            {
                throw new ItemNotFoundException("Current host device not set!");
            }


            return(_currentDevice);
        }