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

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

공개 메소드들

메소드 설명
AddVirtualProject ( ) : void

Links a nested project as a virtual project to the solution.

Close ( ) : int

Return S_OK. Implementation of Closing a nested project is done in CloseNestedProject which is called by CloseChildren.

CloseNestedProjectNode ( ) : void

Closes a nested project and releases the nested hierarchy pointer.

GetAddFileFlags ( string files ) : VSADDFILEFLAGS[]

Sets the VSADDFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnAddFiles

GetAutomationObject ( ) : object

Get the automation object for the NestedProjectNode

GetEditLabel ( ) : string

Called by the shell to get the node caption when the user tries to rename from the GUI

GetGuidProperty ( int propid, System.Guid &guid ) : int

Gets properties whose values are GUIDs.

GetIconHandle ( bool open ) : object

Gets the icon handle. It tries first the nested to get the icon handle. If that is not supported it will get it from the image list of the nested if that is supported. If neither of these is supported a default image will be shown.

GetMKDocument ( ) : string

Returns the moniker of the nested project.

GetProperty ( int propId ) : object

Gets properties of a given node or of the hierarchy.

GetQueryAddFileFlags ( string files ) : VSQUERYADDFILEFLAGS[]

Sets the VSQUERYADDFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnQueryAddFiles

GetQueryRemoveFileFlags ( string files ) : VSQUERYREMOVEFILEFLAGS[]

Sets the VSQUERYREMOVEFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnQueryRemoveFiles

GetRemoveFileFlags ( string files ) : VSREMOVEFILEFLAGS[]

Sets the VSREMOVEFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnRemoveFiles

IgnoreItemFileChanges ( bool ignoreFlag ) : void

Flag indicating that changes to a file can be ignored when item is saved or reloaded.

Init ( string fileName, string destination, string projectName, __VSCREATEPROJFLAGS createFlags ) : void

Initialize the nested hierarhy node.

This methos should be called just after a NestedProjectNode object is created.

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

Determines whether the hierarchy item changed.

NestedProjectNode ( ProjectNode root, ProjectElement element ) : System
OnChanged ( int dispid ) : void

Notifies a sink that the [bindable] property specified by dispID has changed. If dispID is DISPID_UNKNOWN, then multiple properties have changed together. The client (owner of the sink) should then retrieve the current value of each property of interest from the object that generated the notification. In our case we will care about the VSLangProj80.VsProjPropId.VBPROJPROPID_FileName and update the changes in the parent project file.

OnRequestEdit ( int dispid ) : void

Notifies a sink that a [requestedit] property is about to change and that the object is asking the sink how to proceed.

ReloadItem ( uint reserved ) : void

Delegates the call to the inner hierarchy.

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

Saves the hierarchy item to disk.

SetEditLabel ( string label ) : int

Called by the shell when a node has been renamed from the GUI

보호된 메소드들

메소드 설명
CanDeleteItem ( __VSDELETEITEMOPERATION deleteOperation ) : bool

This is temporary until we have support for re-adding a nested item

ConnectPropertyNotifySink ( ) : void

We need to advise property notify sink on project properties so that we know when the project file is renamed through a property.

CreateProjectDirectory ( ) : void

Creates the project directory if it does not exist.

DelegateGetPropertyToNested ( int propID ) : object

Delegates GetProperty calls to the inner nested.

DelegateSetPropertyToNested ( int propID, object value ) : int

Delegates SetProperty calls to the inner nested.

DisconnectPropertyNotifySink ( ) : void

Disconnects the PropertyNotify sink

Dispose ( bool disposing ) : void

The method that does the cleanup.

GetConnectionPointFromPropertySink ( ) : IConnectionPoint

Gets a ConnectionPoint for the IPropertyNotifySink interface.

IgnoreNestedProjectFile ( bool ignoreFlag ) : void

Ignores observing changes on this file depending on the boolean flag.

InitImageHandler ( ) : void
InitializeInstanceGuid ( ) : void
ObserveNestedProjectFile ( ) : void

Starts observing changes on this file.

RenameNestedProjectInParentProject ( string label ) : void

Renames the project file in the parent project structure.

SaveNestedProjectItemInProjectFile ( string newFileName ) : void

Saves the nested project information in the project file.

SetDocCookieOnNestedHier ( uint itemDocCookie ) : void
StopObservingNestedProjectFile ( ) : void

Stops observing changes on this file.

비공개 메소드들

메소드 설명
LockRdtEntry ( ) : void
UnlockRdtEntry ( ) : void

메소드 상세

AddVirtualProject() 공개 메소드

Links a nested project as a virtual project to the solution.
public AddVirtualProject ( ) : void
리턴 void

CanDeleteItem() 보호된 메소드

This is temporary until we have support for re-adding a nested item
protected CanDeleteItem ( __VSDELETEITEMOPERATION deleteOperation ) : bool
deleteOperation __VSDELETEITEMOPERATION
리턴 bool

Close() 공개 메소드

Return S_OK. Implementation of Closing a nested project is done in CloseNestedProject which is called by CloseChildren.
public Close ( ) : int
리턴 int

CloseNestedProjectNode() 공개 메소드

Closes a nested project and releases the nested hierarchy pointer.
public CloseNestedProjectNode ( ) : void
리턴 void

ConnectPropertyNotifySink() 보호된 메소드

We need to advise property notify sink on project properties so that we know when the project file is renamed through a property.
protected ConnectPropertyNotifySink ( ) : void
리턴 void

CreateProjectDirectory() 보호된 메소드

Creates the project directory if it does not exist.
protected CreateProjectDirectory ( ) : void
리턴 void

DelegateGetPropertyToNested() 보호된 메소드

Delegates GetProperty calls to the inner nested.
protected DelegateGetPropertyToNested ( int propID ) : object
propID int The property to delegate.
리턴 object

DelegateSetPropertyToNested() 보호된 메소드

Delegates SetProperty calls to the inner nested.
protected DelegateSetPropertyToNested ( int propID, object value ) : int
propID int The property to delegate.
value object The property to set.
리턴 int

DisconnectPropertyNotifySink() 보호된 메소드

Disconnects the PropertyNotify sink
protected DisconnectPropertyNotifySink ( ) : void
리턴 void

Dispose() 보호된 메소드

The method that does the cleanup.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

GetAddFileFlags() 공개 메소드

Sets the VSADDFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnAddFiles
public GetAddFileFlags ( string files ) : VSADDFILEFLAGS[]
files string The files to which an array of VSADDFILEFLAGS has to be specified.
리턴 VSADDFILEFLAGS[]

GetAutomationObject() 공개 메소드

Get the automation object for the NestedProjectNode
public GetAutomationObject ( ) : object
리턴 object

GetConnectionPointFromPropertySink() 보호된 메소드

Gets a ConnectionPoint for the IPropertyNotifySink interface.
protected GetConnectionPointFromPropertySink ( ) : IConnectionPoint
리턴 IConnectionPoint

GetEditLabel() 공개 메소드

Called by the shell to get the node caption when the user tries to rename from the GUI
public GetEditLabel ( ) : string
리턴 string

GetGuidProperty() 공개 메소드

Gets properties whose values are GUIDs.
public GetGuidProperty ( int propid, System.Guid &guid ) : int
propid int Identifier of the hierarchy property
guid System.Guid Pointer to a GUID property specified in propid
리턴 int

GetIconHandle() 공개 메소드

Gets the icon handle. It tries first the nested to get the icon handle. If that is not supported it will get it from the image list of the nested if that is supported. If neither of these is supported a default image will be shown.
public GetIconHandle ( bool open ) : object
open bool
리턴 object

GetMKDocument() 공개 메소드

Returns the moniker of the nested project.
public GetMKDocument ( ) : string
리턴 string

GetProperty() 공개 메소드

Gets properties of a given node or of the hierarchy.
public GetProperty ( int propId ) : object
propId int Identifier of the hierarchy property
리턴 object

GetQueryAddFileFlags() 공개 메소드

Sets the VSQUERYADDFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnQueryAddFiles
public GetQueryAddFileFlags ( string files ) : VSQUERYADDFILEFLAGS[]
files string The files to which an array of VSADDFILEFLAGS has to be specified.
리턴 VSQUERYADDFILEFLAGS[]

GetQueryRemoveFileFlags() 공개 메소드

Sets the VSQUERYREMOVEFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnQueryRemoveFiles
public GetQueryRemoveFileFlags ( string files ) : VSQUERYREMOVEFILEFLAGS[]
files string The files to which an array of VSQUERYREMOVEFILEFLAGS has to be specified.
리턴 VSQUERYREMOVEFILEFLAGS[]

GetRemoveFileFlags() 공개 메소드

Sets the VSREMOVEFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnRemoveFiles
public GetRemoveFileFlags ( string files ) : VSREMOVEFILEFLAGS[]
files string The files to which an array of VSREMOVEFILEFLAGS has to be specified.
리턴 VSREMOVEFILEFLAGS[]

IgnoreItemFileChanges() 공개 메소드

Flag indicating that changes to a file can be ignored when item is saved or reloaded.
public IgnoreItemFileChanges ( bool ignoreFlag ) : void
ignoreFlag bool Flag indicating whether or not to ignore changes (1 to ignore, 0 to stop ignoring).
리턴 void

IgnoreNestedProjectFile() 보호된 메소드

Ignores observing changes on this file depending on the boolean flag.
protected IgnoreNestedProjectFile ( bool ignoreFlag ) : void
ignoreFlag bool Flag indicating whether or not to ignore changes (1 to ignore, 0 to stop ignoring).
리턴 void

Init() 공개 메소드

Initialize the nested hierarhy node.
This methos should be called just after a NestedProjectNode object is created.
public Init ( string fileName, string destination, string projectName, __VSCREATEPROJFLAGS createFlags ) : void
fileName string The file name of the nested project.
destination string The location of the nested project.
projectName string The name of the project.
createFlags __VSCREATEPROJFLAGS The nested project creation flags
리턴 void

InitImageHandler() 보호된 메소드

protected InitImageHandler ( ) : void
리턴 void

InitializeInstanceGuid() 보호된 메소드

protected InitializeInstanceGuid ( ) : void
리턴 void

IsItemDirty() 공개 메소드

Determines whether the hierarchy item changed.
public IsItemDirty ( uint itemId, IntPtr punkDocData, int &pfDirty ) : int
itemId uint Item identifier of the hierarchy item contained in VSITEMID
punkDocData System.IntPtr Pointer to the IUnknown interface of the hierarchy item.
pfDirty int TRUE if the hierarchy item changed.
리턴 int

NestedProjectNode() 공개 메소드

public NestedProjectNode ( ProjectNode root, ProjectElement element ) : System
root ProjectNode
element ProjectElement
리턴 System

ObserveNestedProjectFile() 보호된 메소드

Starts observing changes on this file.
protected ObserveNestedProjectFile ( ) : void
리턴 void

OnChanged() 공개 메소드

Notifies a sink that the [bindable] property specified by dispID has changed. If dispID is DISPID_UNKNOWN, then multiple properties have changed together. The client (owner of the sink) should then retrieve the current value of each property of interest from the object that generated the notification. In our case we will care about the VSLangProj80.VsProjPropId.VBPROJPROPID_FileName and update the changes in the parent project file.
public OnChanged ( int dispid ) : void
dispid int Dispatch identifier of the property that is about to change or DISPID_UNKNOWN if multiple properties are about to change.
리턴 void

OnRequestEdit() 공개 메소드

Notifies a sink that a [requestedit] property is about to change and that the object is asking the sink how to proceed.
public OnRequestEdit ( int dispid ) : void
dispid int Dispatch identifier of the property that is about to change or DISPID_UNKNOWN if multiple properties are about to change.
리턴 void

ReloadItem() 공개 메소드

Delegates the call to the inner hierarchy.
public ReloadItem ( uint reserved ) : void
reserved uint Reserved parameter defined at the IVsPersistHierarchyItem2::ReloadItem parameter.
리턴 void

RenameNestedProjectInParentProject() 보호된 메소드

Renames the project file in the parent project structure.
protected RenameNestedProjectInParentProject ( string label ) : void
label string The new label.
리턴 void

SaveItem() 공개 메소드

Saves the hierarchy item to disk.
public SaveItem ( VSSAVEFLAGS dwSave, string silentSaveAsName, uint itemid, IntPtr punkDocData, int &pfCancelled ) : int
dwSave VSSAVEFLAGS Flags whose values are taken from the VSSAVEFLAGS enumeration.
silentSaveAsName string File name to be applied when dwSave is set to VSSAVE_SilentSave.
itemid uint Item identifier of the hierarchy item saved from VSITEMID.
punkDocData System.IntPtr Pointer to the IUnknown interface of the hierarchy item saved.
pfCancelled int TRUE if the save action was canceled.
리턴 int

SaveNestedProjectItemInProjectFile() 보호된 메소드

Saves the nested project information in the project file.
protected SaveNestedProjectItemInProjectFile ( string newFileName ) : void
newFileName string
리턴 void

SetDocCookieOnNestedHier() 보호된 메소드

protected SetDocCookieOnNestedHier ( uint itemDocCookie ) : void
itemDocCookie uint
리턴 void

SetEditLabel() 공개 메소드

Called by the shell when a node has been renamed from the GUI
public SetEditLabel ( string label ) : int
label string The name of the new label.
리턴 int

StopObservingNestedProjectFile() 보호된 메소드

Stops observing changes on this file.
protected StopObservingNestedProjectFile ( ) : void
리턴 void