C# Class MonoDevelop.StyleCop.ProjectCache

This class is used for project caching. Once a project got completely cached this should speed everything up a bit.
Show file Open project: DarkCloud14/MonoDevelop.StyleCop

Public Methods

Method Description
AddFile ( ProjectFile fileToAdd ) : void

Adds a project file to the cache if it has a known file extension and exists in the project specified during object creation.

AddFolder ( MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectFolder projectFolder ) : void

Enumerate the given folder and add all compatible files to the cache.

AddProject ( Project projectToAdd ) : bool

Add a project to cache if it has a known project type.

CacheWholeProject ( Project projectToCache ) : void

A call to this function will go through all project files and cache all compatible files.

CreateStyleCopCodeProject ( Project projectToUse ) : CodeProject

Create a StyleCop compatible code project from MonoDevelop project.

GetCachedProjectFiles ( Project associatedProject ) : HashSet

Get all cached files of the associatedProject.

GetProjectForFile ( string fileName ) : Project

Get MonoDevelop project based on fileName

IsWholeProjectCached ( Project projectToCheck ) : bool

Get caching status of a project.

RemoveFile ( ProjectFile fileToRemove ) : void

Removes a file with it's children from cache.

RemoveFile ( ProjectFile fileToRemove, Project projectOfFile ) : void

Removes a file with it's children from cache.

RemoveFolder ( MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectFolder projectFolder ) : void

Enumerate the given folder and remove all files from cache.

RemoveProject ( Project projectToRemove ) : void

Remove project and all it's files from cache.

Private Methods

Method Description
IsDirectory ( string pathToCheck ) : bool

Analyzes pathToCheck and checks if it is just a directory.

Method Details

AddFile() public method

Adds a project file to the cache if it has a known file extension and exists in the project specified during object creation.
public AddFile ( ProjectFile fileToAdd ) : void
fileToAdd MonoDevelop.Projects.ProjectFile File to add to cache
return void

AddFolder() public method

Enumerate the given folder and add all compatible files to the cache.
public AddFolder ( MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectFolder projectFolder ) : void
projectFolder MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectFolder Project folder to enumerate.
return void

AddProject() public method

Add a project to cache if it has a known project type.
public AddProject ( Project projectToAdd ) : bool
projectToAdd MonoDevelop.Projects.Project Project that should be cached.
return bool

CacheWholeProject() public method

A call to this function will go through all project files and cache all compatible files.
public CacheWholeProject ( Project projectToCache ) : void
projectToCache MonoDevelop.Projects.Project Project that should get completely cached.
return void

CreateStyleCopCodeProject() public method

Create a StyleCop compatible code project from MonoDevelop project.
public CreateStyleCopCodeProject ( Project projectToUse ) : CodeProject
projectToUse MonoDevelop.Projects.Project MonoDevelop project to use for StyleCop code project creation.
return CodeProject

GetCachedProjectFiles() public method

Get all cached files of the associatedProject.
public GetCachedProjectFiles ( Project associatedProject ) : HashSet
associatedProject MonoDevelop.Projects.Project Project to get the cached files of.
return HashSet

GetProjectForFile() public method

Get MonoDevelop project based on fileName
public GetProjectForFile ( string fileName ) : Project
fileName string Filename to use during project lookup.
return MonoDevelop.Projects.Project

IsWholeProjectCached() public method

Get caching status of a project.
public IsWholeProjectCached ( Project projectToCheck ) : bool
projectToCheck MonoDevelop.Projects.Project Project to check caching status.
return bool

RemoveFile() public method

Removes a file with it's children from cache.
public RemoveFile ( ProjectFile fileToRemove ) : void
fileToRemove MonoDevelop.Projects.ProjectFile File to remove.
return void

RemoveFile() public method

Removes a file with it's children from cache.
public RemoveFile ( ProjectFile fileToRemove, Project projectOfFile ) : void
fileToRemove MonoDevelop.Projects.ProjectFile File to remove.
projectOfFile MonoDevelop.Projects.Project Project of the file.
return void

RemoveFolder() public method

Enumerate the given folder and remove all files from cache.
public RemoveFolder ( MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectFolder projectFolder ) : void
projectFolder MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectFolder Project folder to enumerate.
return void

RemoveProject() public method

Remove project and all it's files from cache.
public RemoveProject ( Project projectToRemove ) : void
projectToRemove MonoDevelop.Projects.Project Project to remove.
return void