/// <summary>
        /// Initializes a new instance of the <see cref="SectionContentContainer"/> class.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="bDetectChange">if set to <c>true</c> [b detect change].</param>
        public SectionContentContainer(string path, bool bDetectChange = false)
        {
            Disposed      = false;
            _sections     = new Dictionary <string, Dictionary <string, string> >();
            _sectionsLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);

            _config = ConfigManager.GetConfiguration(path, "./configuration");

            if (bDetectChange)
            {
                _config.WatchAllowOnChangeAttribute(".", "reactOnConfigChange", "true");
                _config.OnConfigChange += OnConfigChange;
            }

            ReadSections();
        }
示例#2
0
 /// <summary>
 /// Initializes the <see cref="WorkManagerConfig"/> class.
 /// </summary>
 static WorkManagerConfig()
 {
     Container = ConfigManager.GetConfigurationBySection("./configuration/platoSettings");
     Container.WatchAllowOnChangeAttribute(".", "reactOnConfigChange", "false");
     Container.OnConfigChange += DoConfigFileChanged;
 }