public void SetUp()
        {
            ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap();

            fileMap.ExeConfigFilename = "test.config";
            configuration             = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);
            coordinator    = new ConfigurationChangeWatcherCoordinator(configuration.FilePath, false);
            notifiedEvents = new List <ConfigurationChangedEventArgs>();
        }
        public void SetUp()
        {
            ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap();
            fileMap.ExeConfigFilename = "test.config";
            configuration = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);

            coordinator = new ConfigurationChangeWatcherCoordinator(configuration.FilePath, false);

            notifiedEvents = new List<ConfigurationChangedEventArgs>();
        }
Ejemplo n.º 3
0
        public void SetUp()
        {
            testConfigurationFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Other.config");
            ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();

            configMap.ExeConfigFilename = testConfigurationFile;

            File.Copy(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile, testConfigurationFile, true);
            rwConfiguration = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);

            policyRegistrationBuilder = new MockGroupPolicyNotificationRegistrationBuilder();
            groupPolicyWatcher        = new GroupPolicyWatcher(policyRegistrationBuilder);
            watcherCoordinator        = new ConfigurationChangeWatcherCoordinator(testConfigurationFile, false);
            notificationCoordinator   = new ConfigurationChangeNotificationCoordinator();

            valuesForNotifiedSections = new Dictionary <string, string>();
        }
        public void SetUp()
        {
            AppDomain.CurrentDomain.SetData("APPBASE", Environment.CurrentDirectory);

            testConfigurationFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Other.config");
            ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();
            configMap.ExeConfigFilename = testConfigurationFile;

            File.Copy(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile, testConfigurationFile, true);
            rwConfiguration = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);

            policyRegistrationBuilder = new MockGroupPolicyNotificationRegistrationBuilder();
            groupPolicyWatcher = new GroupPolicyWatcher(policyRegistrationBuilder);
            watcherCoordinator = new ConfigurationChangeWatcherCoordinator(testConfigurationFile, false);
            notificationCoordinator = new ConfigurationChangeNotificationCoordinator();

            valuesForNotifiedSections = new Dictionary<string, string>();
        }