Exemple #1
0
        private static void RunTestWithRegValues(IServiceCollection services, Dictionary <string, object> regValues)
        {
            WithUniqueTempRegKey(registryKey =>
            {
                foreach (var entry in regValues)
                {
                    registryKey.SetValue(entry.Key, entry.Value);
                }

                var policyResolver = new RegistryPolicyResolver(registryKey);
                services.Add(policyResolver.ResolvePolicy());
            });
        }
        private static RegistryPolicy RunTestWithRegValues(Dictionary <string, object> regValues)
        {
            return(WithUniqueTempRegKey(registryKey =>
            {
                foreach (var entry in regValues)
                {
                    registryKey.SetValue(entry.Key, entry.Value);
                }

                var policyResolver = new RegistryPolicyResolver(
                    registryKey,
                    activator: SimpleActivator.DefaultWithoutServices);

                return policyResolver.ResolvePolicy();
            }));
        }
        private static void RunTestWithRegValues(IServiceCollection services, Dictionary<string, object> regValues)
        {
            WithUniqueTempRegKey(registryKey =>
            {
                foreach (var entry in regValues)
                {
                    registryKey.SetValue(entry.Key, entry.Value);
                }

                var policyResolver = new RegistryPolicyResolver(registryKey);
                services.Add(policyResolver.ResolvePolicy());
            });
        }