public IConfigurationSectionContents GetSection(string sectionName, Func <IEnumerable <string>, IEnumerable <string> > postProcessing)
        {
            var filename = new RelativePath(sectionName);
            var contents = _configurationFileLocator.ReadFile(filename, (path, lines) => postProcessing(lines)).ToReadOnlyCollection();

            return(new ConfigurationSectionContents(sectionName, contents));
        }
Пример #2
0
 private IList <string> ReadDisableCheckers()
 {
     return
         (_configurationFileLocator.ReadFile(new RelativePath(ConfigurationStyleFilenames.ChromiumStyleCheckersDisabled),
                                             (filename, x) => x.Where(line => !line.TrimStart().StartsWith("#"))).ToList());
 }