public void Register()
        {
            ConfigurationDesignManager manager = new ConfigurationDesignManager();
            ApplicationData data = ApplicationData.FromCurrentAppDomain();
            ApplicationConfigurationNode applicationNode = new ApplicationConfigurationNode(data.Name, data);

            manager.Register(applicationNode, null);

            Assert.AreEqual(1, applicationNode.NewCommand.SubCommands.Count);
        }
Example #2
0
        public bool Equals(ConfigurationDesignManagerProxy other)
        {
            if (null == other)
            {
                throw new ArgumentNullException("other");
            }

            if (ConfigurationDesignManager.GetType() == other.ConfigurationDesignManager.GetType())
            {
                return(true);
            }
            return(false);
        }
        public void BuildContext()
        {
            ApplicationData data = ApplicationData.FromCurrentAppDomain();
            ApplicationConfigurationNode applicationNode = new ApplicationConfigurationNode(data.Name, data);
            ConfigurationDesignManager manager = new ConfigurationDesignManager();
            manager.Register(applicationNode, null);
            foreach (ConfigurationNodeCommand command in applicationNode.NewCommand.SubCommands)
            {
                command.Execute();
            }

            ConfigurationDictionary dictionary = new ConfigurationDictionary();
            manager.BuildContext(applicationNode, dictionary);
            Assert.AreEqual(1, dictionary.Count);
            Assert.IsTrue(dictionary.Contains(CryptographySettings.SectionName));
        }
 public void Setup()
 {
     ConfigurationDesignManager manager = new ConfigurationDesignManager();
        ApplicationData data = ApplicationData.FromCurrentAppDomain();
        manager.Register(new ApplicationConfigurationNode(data.Name, data), null);
 }