OpenIDE.CodeEngine.Core.Caching.TypeCache.GetFilesInProject C# (CSharp) Method

GetFilesInProject() public method

public GetFilesInProject ( string project ) : List
project string
return List
        public List<FileFindResult> GetFilesInProject(string project)
        {
            var prj = GetProject(project);
            if (prj == null)
                return new List<FileFindResult>();
            return new HierarchyBuilder(_files.ToList(), _projects.ToList())
                .GetNextStepInProject(prj).ToList();
        }

Same methods

TypeCache::GetFilesInProject ( string project, string path ) : List

Usage Example

        public void When_given_a_project_and_a_directory_it_will_pull_out_files_and_directories_contained_by_it()
        {
            var cache = new TypeCache();
            var project = new Project(to("/Some/Path/MyProject.csproj"), "");
            cache.Add(toFile("/Some/Path/File1.cs", project.File));
            cache.Add(toFile("/Some/Path/File2.cs", project.File));
            cache.Add(toFile("/Some/Path/In/AnotherpathPlace/File2.cs", project.File));
            cache.Add(toFile("/Some/Path/In/AnotherpathPlace/File3.cs", project.File));
            cache.Add(project);
            cache.Add(toFile("/Some/Path/In/FileNotInProject.cs"));

            var verifier = new ResultVerifier(cache.GetFilesInProject(to("/Some/Path/MyProject.csproj"), to("/Some/Path/In")));
            verifier.VerifyCount(1);
            verifier.Verify(0, FileFindResultType.DirectoryInProject, to("/Some/Path/In/AnotherpathPlace"), to("/Some/Path/MyProject.csproj"));
        }