コード例 #1
0
        public void Update()
        {
            _searchItems.Clear();

            var classNames = ClassNames.ToList();
            var i          = 0;
            var n          = classNames.Count;
            var progress   = new Progress <ProgressInfo>();

            TaskStarted?.Invoke(progress);

            var progressInterface = (IProgress <ProgressInfo>)progress;

            _searchItems.AddRange(
                classNames
                .Select(
                    name => {
                var subKey   = _clsidKey.OpenSubKey(name);
                var regClass = subKey != default ? CreateSearchItem(new RegistryClass(subKey)) : default;
                progressInterface.Report(new ProgressInfo("Load Classes", ++i, n));
                return(regClass);
            }
                    )
                );
            OnPropertyChanged(nameof(Items));
        }