C# Class Umbraco.UmbracoStudio.VisualStudio.ProjectCache

Cache that stores project based on multiple names. i.e. Project can be retrieved by name (if non conflicting), unique name and custom unique name.
Afficher le fichier Open project: umbraco/Visual-Studio-Extension Class Usage Examples

Méthodes publiques

Méthode Description
AddProject ( Project project ) : ProjectName

Add a project to the cache.

Contains ( string name ) : bool
GetProjects ( ) : IEnumerable

Returns all cached projects.

IsAmbiguous ( string shortName ) : bool

Determines if a short name is ambiguous

RemoveProject ( string name ) : void

Removes a project and returns the project name instance of the removed project.

TryGetProject ( string name, Project &project ) : bool

Finds a project by short name, unique name or custom unique name.

TryGetProjectName ( string name, ProjectName &projectName ) : bool

Finds a project name by short name, unique name or custom unique name.

TryGetProjectNameByShortName ( string name, ProjectName &projectName ) : bool

Tries to find a project by short name. Returns the project name if and only if it is non-ambiguous.

Private Methods

Méthode Description
AddShortName ( ProjectName projectName ) : void

Adds an entry to the short name cache returning any conflicting project name.

RemoveProjectName ( ProjectName projectName ) : void

Removes a project from the project name dictionary.

RemoveShortName ( ProjectName projectName ) : void

Removes a project from the short name cache.

Method Details

AddProject() public méthode

Add a project to the cache.
public AddProject ( Project project ) : ProjectName
project Project project to add to the cache.
Résultat ProjectName

Contains() public méthode

public Contains ( string name ) : bool
name string
Résultat bool

GetProjects() public méthode

Returns all cached projects.
public GetProjects ( ) : IEnumerable
Résultat IEnumerable

IsAmbiguous() public méthode

Determines if a short name is ambiguous
public IsAmbiguous ( string shortName ) : bool
shortName string short name of the project
Résultat bool

RemoveProject() public méthode

Removes a project and returns the project name instance of the removed project.
public RemoveProject ( string name ) : void
name string name of the project to remove.
Résultat void

TryGetProject() public méthode

Finds a project by short name, unique name or custom unique name.
public TryGetProject ( string name, Project &project ) : bool
name string name of the project to retrieve.
project Project project instance
Résultat bool

TryGetProjectName() public méthode

Finds a project name by short name, unique name or custom unique name.
public TryGetProjectName ( string name, ProjectName &projectName ) : bool
name string name of the project
projectName ProjectName project name instance
Résultat bool

TryGetProjectNameByShortName() public méthode

Tries to find a project by short name. Returns the project name if and only if it is non-ambiguous.
public TryGetProjectNameByShortName ( string name, ProjectName &projectName ) : bool
name string
projectName ProjectName
Résultat bool