Example #1
0
        public override bool OverrideWithGroupPoliciesAndGenerateWmiObjects(ConfigurationSection configurationObject,
                                                                            bool readGroupPolicies, IRegistryKey machineKey, IRegistryKey userKey,
                                                                            bool generateWmiObjects, ICollection <ConfigurationSetting> wmiSettings)
        {
            called = true;
            this.configurationObject = configurationObject;
            this.readGroupPolicies   = readGroupPolicies;
            this.machineKey          = machineKey;
            this.userKey             = userKey;
            this.generateWmiObjects  = generateWmiObjects;
            IRegistryKey policyKey = GetPolicyKey(machineKey, userKey);

            if (policyKey != null)
            {
                if (!policyKey.GetBoolValue(PolicyValueName).Value)
                {
                    return(false);
                }
                TestsConfigurationSection section = configurationObject as TestsConfigurationSection;
                if (section != null)
                {
                    try
                    {
                        section.Value = policyKey.GetStringValue(ValuePropertyName);
                    }
                    catch (RegistryAccessException)
                    { }
                }
            }
            if (generateWmiObjects)
            {
                TestConfigurationSettings setting = new TestConfigurationSettings(configurationObject.ToString());
                setting.SourceElement = configurationObject;
                wmiSettings.Add(setting);
            }
            return(true);
        }
        protected override void OverrideWithGroupPolicies(SymmetricStorageEncryptionProviderData configurationObject, IRegistryKey policyKey)
        {
            String symmetricInstanceOverride = policyKey.GetStringValue(SymmetricInstancePropertyName);

            configurationObject.SymmetricInstance = symmetricInstanceOverride;
        }
Example #3
0
        protected internal static String GetFormatterPolicyOverride(IRegistryKey policyKey)
        {
            String overrideValue = policyKey.GetStringValue(FormatterPropertyName);

            return(AdmContentBuilder.NoneListItem.Equals(overrideValue) ? String.Empty : overrideValue);
        }
Example #4
0
        private static String GetDefaultProviderPolicyOverride(String propertyName, IRegistryKey policyKey)
        {
            String overrideValue = policyKey.GetStringValue(propertyName);

            return(AdmContentBuilder.NoneListItem.Equals(overrideValue) ? String.Empty : overrideValue);
        }
Example #5
0
        protected override void OverrideWithGroupPolicies(TextFormatterData configurationObject, IRegistryKey policyKey)
        {
            String templateOverride = UnescapeString(policyKey.GetStringValue(TemplatePropertyName));

            configurationObject.Template = templateOverride;
        }
        protected override void OverrideWithGroupPolicies(IsolatedStorageCacheStorageData configurationObject, IRegistryKey policyKey)
        {
            String partitionNameOverride = policyKey.GetStringValue(PartitionNamePropertyName);

            configurationObject.PartitionName = partitionNameOverride;
        }