public override async Task <bool> Set(SettingGroup settingGroup, Values values)
        {
            foreach ((Setting setting, object?value) in values)
            {
                SystemSettingItem settingItem = this.GetSettingItem(setting.Name);
                await settingItem.SetValue(value);
            }

            return(true);
        }
        private SystemSettingItem GetSettingItem(string settingName)
        {
            // Cache the instance, in case it's re-used.
            if (!settingCache.TryGetValue(settingName, out SystemSettingItem? settingItem))
            {
                settingItem = new SystemSettingItem(settingName, false);
                settingCache[settingName] = settingItem;
            }

            return(settingItem);
        }
        public override async Task <Values> Get(SettingGroup settingGroup, IEnumerable <Setting> settings)
        {
            Values values = new Values();

            foreach (Setting setting in settings)
            {
                SystemSettingItem settingItem = this.GetSettingItem(setting.Name);
                object?           value       = await settingItem.GetValue();

                values.Add(setting, value);
            }

            return(values);
        }
        private SystemSettingItem?GetSettingItem(string settingName)
        {
            // certain setting(s) are not supported for "get" operations on Windows 10 v1809 under our current reverse-engineered "get value" scheme; filter those now
            if (Morphic.WindowsNative.OsVersion.OsVersion.GetWindowsVersion() == Morphic.WindowsNative.OsVersion.WindowsVersion.Win10_v1809)
            {
                if (IsSettingSupportedInWindows10v1809(settingName) == false)
                {
                    return(null);
                }
            }

            // Cache the instance, in case it's re-used.
            if (!settingCache.TryGetValue(settingName, out SystemSettingItem? settingItem))
            {
                settingItem = new SystemSettingItem(settingName, false);
                settingCache[settingName] = settingItem;
            }

            return(settingItem);
        }