C# Class T4Scaffolding.Core.ProjectTypeLocators.EnvDTETypeLocator

Inheritance: IProjectTypeLocator
ファイルを表示 Open project: processedbeets/ASP.NET-MVC-Scaffolding

Public Methods

Method Description
FindAllTypes ( Project project ) : IEnumerable
FindTypeExactMatch ( Project project, string typeName ) : CodeType

Gets the type only if typeName is its fully-qualified name and it's local to the specified project

FindTypes ( Project project, string typeName ) : IEnumerable
FindUniqueType ( Project project, string typeName ) : CodeType

Private Methods

Method Description
GetCodeTypesFromLocalCodeElements ( CodeElements codeElements ) : IEnumerable

Recursively scan to extract all CodeType elements. But since the CodeModel contains *all* referenced types (including the whole of System.*), it would be too slow to consider them all. We're only interested in types defined in the project itself, so we disregard namespaces that contain one or more type with InfoLocation != vsCMInfoLocation.vsCMInfoLocationProject

GetReferencedSolutionProjects ( Project project, bool includeSuppliedProject ) : IEnumerable

Picks out the referenced projects that are defined in your solution (i.e., are not external assemblies) by discarding references without a SourceProject

PickArbitraryRepresentativeOfPartialClasses ( IEnumerable codeTypes ) : List

Out of a set of CodeType instances, some of them may be different partials of the same class. This method filters down such a set so that you get only one partial per class.

Method Details

FindAllTypes() public method

public FindAllTypes ( Project project ) : IEnumerable
project Project
return IEnumerable

FindTypeExactMatch() public method

Gets the type only if typeName is its fully-qualified name and it's local to the specified project
public FindTypeExactMatch ( Project project, string typeName ) : CodeType
project Project
typeName string
return CodeType

FindTypes() public method

public FindTypes ( Project project, string typeName ) : IEnumerable
project Project
typeName string
return IEnumerable

FindUniqueType() public method

public FindUniqueType ( Project project, string typeName ) : CodeType
project Project
typeName string
return CodeType