Esempio n. 1
0
        private static IEnumerable <string> GetConfigurationFilePaths()
        {
            yield return(ConfigurationMonitor.GetConfigurationPath(ConfigurationUserLevel.None));

            yield return(ConfigurationMonitor.GetConfigurationPath(ConfigurationUserLevel.PerUserRoaming));

            yield return(ConfigurationMonitor.GetConfigurationPath(ConfigurationUserLevel.PerUserRoamingAndLocal));
        }
Esempio n. 2
0
 private static IEnumerable <FileSystemWatcher> GetWatchers()
 {
     return(ConfigurationMonitor.GetConfigurationFilePaths().Where <string>((Func <string, bool>)(p =>
     {
         if (p != null)
         {
             return Directory.Exists(p);
         }
         return false;
     })).Select <string, FileSystemWatcher>((Func <string, FileSystemWatcher>)(p => ConfigurationMonitor.CreateWatcher(p))));
 }