Inheritance: ConfigurationSection
Esempio n. 1
0
        private static void Init()
        {
            CustomConfigSection customConfig = (CustomConfigSection)ConfigurationManager.GetSection("CustomConfigSection");

            using (CustomConfigSectionManager customConfigSectionManager = new CustomConfigSectionManager())
            {
                CultureElement culture = customConfigSectionManager.GetCurrentCulture();

                Thread.CurrentThread.CurrentUICulture = new CultureInfo(Convert.ToInt32(culture.Name.ToString("D")));

                Id = customConfigSectionManager.GetCurrentCount();

                Rules = customConfigSectionManager.GetRules();

                watchersLst = new List <FileSystemWatcher>();

                foreach (DirectoryElement item in customConfigSectionManager.GetDirectories())
                {
                    watchersLst.Add(CreateWatcher(item.Path, Watcher_Changed));
                }
            }
        }
Esempio n. 2
0
 public SecEventChecker()
 {
     section = ConfigurationManager.GetSection("appsettings") as CustomConfigSection;
     InitializeComponent();
 }
Esempio n. 3
0
        public Checker()
        {
            CustomConfigSection section = ConfigurationManager.GetSection("appsettings") as CustomConfigSection;

            _timepsan = section.Timespan;
        }