コード例 #1
0
        public List <HardwareInfo> Invoke(bool onlyAvailable)
        {
            var availableBoards = _boardProvider.ProvideAttachedHardwareInfo();

            if (!onlyAvailable)
            {
                return(availableBoards);
            }

            IEnumerable <string> registeredIdentifiers = _deviceManager.GetAllDevices().Select(x => x.Info.HardwareId);

            return(availableBoards.Where(x => !registeredIdentifiers.Contains(x.HardwareId)).ToList());
        }
コード例 #2
0
 public List <HardwareInfo> Index()
 {
     return(_boardProvider.ProvideAttachedHardwareInfo());
 }