C# 클래스 Microsoft.VisualStudio.Project.ProjectContainerNode

상속: ProjectNode, IVsParentProject, IBuildDependencyOnProjectContainer
파일 보기 프로젝트 열기: tunnelvisionlabs/MPFProj10 1 사용 예제들

공개 메소드들

메소드 설명
AddExistingNestedProject ( ProjectElement element, __VSCREATEPROJFLAGS creationFlags ) : NestedProjectNode

Add an existing project as a nested node of our hierarchy. This is used while loading the project and can also be used to add an existing project to our hierarchy.

AddNestedProjectFromTemplate ( ProjectElement element, __VSCREATEPROJFLAGS creationFlags ) : NestedProjectNode

This will clone a template project file and add it as a subproject to our hierarchy. If you want to create a project for which there exist a vstemplate, consider using RunVsTemplateWizard instead.

AddNestedProjectFromTemplate ( string fileName, string destination, string projectName, ProjectElement element, __VSCREATEPROJFLAGS creationFlags ) : NestedProjectNode

This can be called directly or through RunVsTemplateWizard. This will clone a template project file and add it as a subproject to our hierarchy. If you want to create a project for which there exist a vstemplate, consider using RunVsTemplateWizard instead.

CloseChildren ( ) : int
CreateNestedProjectNodes ( ) : void

This is used when loading the project to loop through all the items and for each SubProject it finds, it create the project and a node in our Hierarchy to hold the project.

EnumNestedHierachiesForBuildDependency ( ) : IVsHierarchy[]

Enumerates the nested hierachies that should be added to the build dependency list.

IsItemDirty ( uint itemId, IntPtr punkDocData, int &pfDirty ) : int
OpenChildren ( ) : int
ReloadItem ( uint itemId, uint reserved ) : int

Called to reload a project item. Reloads a project and its nested project nodes.

RemoveNestedProjectNodes ( ) : void
RunVSTemplateWizard ( ProjectElement element, bool silent ) : void

Let the wizard code execute and provide us the information we need. Our SolutionFolder automation object should be called back with the details at which point it will call back one of our method to add a nested project. If you are trying to add a new subproject this is probably the method you want to call. If you are just trying to clone a template project file, then AddNestedProjectFromTemplate is what you want.

SaveItem ( VSSAVEFLAGS dwSave, string silentSaveAsName, uint itemid, IntPtr punkDocData, int &pfCancelled ) : int

보호된 메소드들

메소드 설명
AddVirtualProjects ( ) : void

Links the nested project nodes to the solution. The default implementation parses all nested project nodes and calles AddVirtualProjectEx on them.

CreateNestedProjectNode ( ProjectElement element ) : NestedProjectNode

Override this method if you want to provide your own type of nodes. This would be the case if you derive a class from NestedProjectNode

FilterItemTypeToBeAddedToHierarchy ( string itemType ) : bool
GetProjectTemplatePath ( ProjectElement element ) : string

Based on the Template and TypeGuid properties of the element, generate the full template path. TypeGuid should be the Guid of a registered project factory. Template can be a full path, a project template (for projects that support VsTemplates) or a relative path (for other projects).

GetRegisteredProject ( ProjectElement element ) : RegisteredProjectType

Get information from the registry based for the project factory corresponding to the TypeGuid of the element

OnNestedProjectFileChangedOnDisk ( object sender, FileChangedOnDiskEventArgs e ) : void

Event callback. Called when one of the nested project files is changed.

ProjectContainerNode ( ProjectPackage package ) : System
Reload ( ) : void

Reloads a project and its nested project nodes.

ReloadNestedProjectNode ( NestedProjectNode node ) : void

Reloads a nested project node by deleting it and readding it.

비공개 메소드들

메소드 설명
GetNestedHierarchy ( UInt32 itemId, System.Guid &iidHierarchyNested, IntPtr &ppHierarchyNested, uint &pItemId ) : int

메소드 상세

AddExistingNestedProject() 공개 메소드

Add an existing project as a nested node of our hierarchy. This is used while loading the project and can also be used to add an existing project to our hierarchy.
public AddExistingNestedProject ( ProjectElement element, __VSCREATEPROJFLAGS creationFlags ) : NestedProjectNode
element ProjectElement
creationFlags __VSCREATEPROJFLAGS
리턴 NestedProjectNode

AddNestedProjectFromTemplate() 공개 메소드

This will clone a template project file and add it as a subproject to our hierarchy. If you want to create a project for which there exist a vstemplate, consider using RunVsTemplateWizard instead.
public AddNestedProjectFromTemplate ( ProjectElement element, __VSCREATEPROJFLAGS creationFlags ) : NestedProjectNode
element ProjectElement
creationFlags __VSCREATEPROJFLAGS
리턴 NestedProjectNode

AddNestedProjectFromTemplate() 공개 메소드

This can be called directly or through RunVsTemplateWizard. This will clone a template project file and add it as a subproject to our hierarchy. If you want to create a project for which there exist a vstemplate, consider using RunVsTemplateWizard instead.
public AddNestedProjectFromTemplate ( string fileName, string destination, string projectName, ProjectElement element, __VSCREATEPROJFLAGS creationFlags ) : NestedProjectNode
fileName string
destination string
projectName string
element ProjectElement
creationFlags __VSCREATEPROJFLAGS
리턴 NestedProjectNode

AddVirtualProjects() 보호된 메소드

Links the nested project nodes to the solution. The default implementation parses all nested project nodes and calles AddVirtualProjectEx on them.
protected AddVirtualProjects ( ) : void
리턴 void

CloseChildren() 공개 메소드

public CloseChildren ( ) : int
리턴 int

CreateNestedProjectNode() 보호된 메소드

Override this method if you want to provide your own type of nodes. This would be the case if you derive a class from NestedProjectNode
protected CreateNestedProjectNode ( ProjectElement element ) : NestedProjectNode
element ProjectElement
리턴 NestedProjectNode

CreateNestedProjectNodes() 공개 메소드

This is used when loading the project to loop through all the items and for each SubProject it finds, it create the project and a node in our Hierarchy to hold the project.
public CreateNestedProjectNodes ( ) : void
리턴 void

EnumNestedHierachiesForBuildDependency() 공개 메소드

Enumerates the nested hierachies that should be added to the build dependency list.
public EnumNestedHierachiesForBuildDependency ( ) : IVsHierarchy[]
리턴 IVsHierarchy[]

FilterItemTypeToBeAddedToHierarchy() 보호된 메소드

protected FilterItemTypeToBeAddedToHierarchy ( string itemType ) : bool
itemType string
리턴 bool

GetProjectTemplatePath() 보호된 메소드

Based on the Template and TypeGuid properties of the element, generate the full template path. TypeGuid should be the Guid of a registered project factory. Template can be a full path, a project template (for projects that support VsTemplates) or a relative path (for other projects).
protected GetProjectTemplatePath ( ProjectElement element ) : string
element ProjectElement
리턴 string

GetRegisteredProject() 보호된 메소드

Get information from the registry based for the project factory corresponding to the TypeGuid of the element
protected GetRegisteredProject ( ProjectElement element ) : RegisteredProjectType
element ProjectElement
리턴 RegisteredProjectType

IsItemDirty() 공개 메소드

public IsItemDirty ( uint itemId, IntPtr punkDocData, int &pfDirty ) : int
itemId uint
punkDocData System.IntPtr
pfDirty int
리턴 int

OnNestedProjectFileChangedOnDisk() 보호된 메소드

Event callback. Called when one of the nested project files is changed.
protected OnNestedProjectFileChangedOnDisk ( object sender, FileChangedOnDiskEventArgs e ) : void
sender object The FileChangeManager object.
e FileChangedOnDiskEventArgs Event args containing the file name that was updated.
리턴 void

OpenChildren() 공개 메소드

public OpenChildren ( ) : int
리턴 int

ProjectContainerNode() 보호된 메소드

protected ProjectContainerNode ( ProjectPackage package ) : System
package ProjectPackage
리턴 System

Reload() 보호된 메소드

Reloads a project and its nested project nodes.
protected Reload ( ) : void
리턴 void

ReloadItem() 공개 메소드

Called to reload a project item. Reloads a project and its nested project nodes.
public ReloadItem ( uint itemId, uint reserved ) : int
itemId uint Specifies itemid from VSITEMID.
reserved uint Reserved.
리턴 int

ReloadNestedProjectNode() 보호된 메소드

Reloads a nested project node by deleting it and readding it.
protected ReloadNestedProjectNode ( NestedProjectNode node ) : void
node NestedProjectNode The node to reload.
리턴 void

RemoveNestedProjectNodes() 공개 메소드

public RemoveNestedProjectNodes ( ) : void
리턴 void

RunVSTemplateWizard() 공개 메소드

Let the wizard code execute and provide us the information we need. Our SolutionFolder automation object should be called back with the details at which point it will call back one of our method to add a nested project. If you are trying to add a new subproject this is probably the method you want to call. If you are just trying to clone a template project file, then AddNestedProjectFromTemplate is what you want.
public RunVSTemplateWizard ( ProjectElement element, bool silent ) : void
element ProjectElement The project item to use as the base of the nested project.
silent bool true if the wizard should run silently, otherwise false.
리턴 void

SaveItem() 공개 메소드

public SaveItem ( VSSAVEFLAGS dwSave, string silentSaveAsName, uint itemid, IntPtr punkDocData, int &pfCancelled ) : int
dwSave VSSAVEFLAGS
silentSaveAsName string
itemid uint
punkDocData System.IntPtr
pfCancelled int
리턴 int