Exemple #1
0
 private static void FillSources(IList <IFileSystemInfo> sources, IList <string> scripts)
 {
     foreach (var script in scripts)
     {
         sources.Add(FileSystemFactory.FileSystemInfoFromPath(script));
     }
 }
Exemple #2
0
 public void LoadFrom(string configurationFile)
 {
     try
     {
         var info = string.IsNullOrEmpty(configurationFile) ? null : FileSystemFactory.FileSystemInfoFromPath(configurationFile);
         LoadFrom(info);
     }
     catch (Exception ex) when((ex as IOException) == null)
     {
         throw new ConfigurationErrorsException("Fail to load configuration from [{0}].".FormatWith(configurationFile), ex);
     }
 }