public static IConfigSource CreateConfigSource(object source, bool addWatcher) {
			var fileInfo = source as FileInfo;
			if(fileInfo != null) {
				FileConfigSourceWatcher watcher = null;
				if(addWatcher){
					watcher = new FileConfigSourceWatcher(fileInfo);
				}
				return new ConfigSource(fileInfo, watcher);
			}
			return new ConfigSource(source);
		}
Exemple #2
0
        public static IConfigSource CreateConfigSource(object source, bool addWatcher)
        {
            var fileInfo = source as FileInfo;

            if (fileInfo != null)
            {
                FileConfigSourceWatcher watcher = null;
                if (addWatcher)
                {
                    watcher = new FileConfigSourceWatcher(fileInfo);
                }
                return(new ConfigSource(fileInfo, watcher));
            }
            return(new ConfigSource(source));
        }