private Project CreateProject(FullPath rootPath)
 {
     var fileWithSections = new FileWithSections(_fileSystem, rootPath.Combine(new RelativePath(ConfigurationFilenames.ProjectFileNameDetection)));
       var configurationProvider = new FileWithSectionConfigurationProvider(fileWithSections);
       return new Project(configurationProvider, rootPath);
 }
 private IProject CreateProject(FullPathName rootPath)
 {
     var fileWithSections = new FileWithSections(rootPath.Combine(ConfigurationFilenames.ProjectFileNameDetection).FullName);
       var configurationProvider = new FileWithSectionConfigurationProvider(fileWithSections);
       return new ProjectFileProject(configurationProvider, rootPath);
 }
    /// <summary>
    /// Create a project instance corresponding to the vschromium project file
    /// on disk at <paramref name="rootPath"/>.
    /// Return <code>null</code> if there is no project file.
    /// </summary>
    private Project CreateProject(FullPath rootPath) {
      var projectFilePath = rootPath.Combine(new RelativePath(ConfigurationFileNames.ProjectFileName));
      var sectionName = ConfigurationSectionNames.SourceExplorerIgnore;
      if (!_fileSystem.FileExists(projectFilePath)) {
        projectFilePath = rootPath.Combine(new RelativePath(ConfigurationFileNames.ProjectFileNameObsolete));
        sectionName = ConfigurationSectionNames.SourceExplorerIgnoreObsolete;
        if (!_fileSystem.FileExists(projectFilePath)) {
          return null;
        }
      }

      var fileWithSections = new FileWithSections(_fileSystem, projectFilePath);
      var configurationProvider = new FileWithSectionConfigurationProvider(fileWithSections);
      var s1 = ConfigurationSectionContents.Create(configurationProvider, sectionName);
      var s2 = ConfigurationSectionContents.Create(configurationProvider, ConfigurationSectionNames.SearchableFilesIgnore);
      var s3 = ConfigurationSectionContents.Create(configurationProvider, ConfigurationSectionNames.SearchableFilesInclude);
      var fileFilter = new FileFilter(s1);
      var directoryFilter = new DirectoryFilter(s1);
      var searchableFilesFilter = new SearchableFilesFilter(s2, s3);
      return new Project(rootPath, fileFilter, directoryFilter, searchableFilesFilter, fileWithSections.Hash);
    }