Esempio n. 1
0
 private static ProjectConfigurationSectionDetails CreateSectionDetails(IConfigurationSectionContents section)
 {
     return(new ProjectConfigurationSectionDetails {
         ContainingFilePath = section.ContainingFilePath.Value,
         Name = section.Name,
         Contents = section.Contents.Aggregate("", (acc, s1) => acc + "\r\n" + s1)
     });
 }
Esempio n. 2
0
 public PropertyCollection(IConfigurationSectionContents contents)
 {
     foreach (string line in contents.Contents)
     {
         Match match = Regex.Match(line, @"(?<name>\w*)\s*=\s*(?<value>\w*)");
         if (match.Success)
         {
             _properties.Add(match.Groups["name"].Value.ToString(), match.Groups["value"].Value.ToString());
         }
     }
 }
Esempio n. 3
0
 public Project(
     FullPath rootPath,
     IConfigurationSectionContents pathsIgnoreConfiguration,
     IConfigurationSectionContents searchableFilesIgnoreConfiguration,
     IConfigurationSectionContents searchableFilesIncludeConfiguration,
     IFileFilter fileFilter,
     IDirectoryFilter directoryFilter,
     ISearchableFilesFilter searchableFilesFilter,
     string hash)
 {
     _rootPath = rootPath;
     _pathsIgnoreConfiguration            = pathsIgnoreConfiguration;
     _searchableFilesIncludeConfiguration = searchableFilesIncludeConfiguration;
     _searchableFilesIgnoreConfiguration  = searchableFilesIgnoreConfiguration;
     _directoryFilter       = directoryFilter;
     _fileFilter            = fileFilter;
     _searchableFilesFilter = searchableFilesFilter;
     _hash = hash;
 }
 public FilePatternsPathMatcherProvider(IConfigurationSectionContents contents) {
   _sectionContents = contents;
   _matcherLines = new Lazy<List<PathMatcher>>(CreateMatcherLines, LazyThreadSafetyMode.PublicationOnly);
   _matcher = new Lazy<IPathMatcher>(CreateMatcher, LazyThreadSafetyMode.PublicationOnly);
 }
Esempio n. 5
0
 public FileFilter(IConfigurationSectionContents contents) {
   _ignoreMatcherProvider = new FilePatternsPathMatcherProvider(contents);
 }
 public SearchableFilesFilter(IConfigurationSectionContents s1, IConfigurationSectionContents s2)
 {
     _ignoreMatcherProvider  = new FilePatternsPathMatcherProvider(s1);
     _includeMatcherProvider = new FilePatternsPathMatcherProvider(s2);
 }
 public SearchableFilesFilter(IConfigurationSectionContents ignoreSection, IConfigurationSectionContents includeSection)
 {
     _ignoreMatcherProvider  = new FilePatternsPathMatcherProvider(ignoreSection);
     _includeMatcherProvider = new FilePatternsPathMatcherProvider(includeSection);
 }
 public FilePatternsPathMatcherProvider(IConfigurationSectionContents contents)
 {
     _sectionContents = contents;
     _matcherLines    = new Lazy <List <PathMatcher> >(CreateMatcherLines, LazyThreadSafetyMode.PublicationOnly);
     _matcher         = new Lazy <IPathMatcher>(CreateMatcher, LazyThreadSafetyMode.PublicationOnly);
 }
Esempio n. 9
0
 public DirectoryFilter(IConfigurationSectionContents contents)
 {
     _ignoreMatcherProvider = new FilePatternsPathMatcherProvider(contents);
 }
Esempio n. 10
0
 public SearchableFilesFilter(IConfigurationSectionContents s1, IConfigurationSectionContents s2) {
   _ignoreMatcherProvider = new FilePatternsPathMatcherProvider(s1);
   _includeMatcherProvider = new FilePatternsPathMatcherProvider(s2);
 }