다음을 통해 공유


RunningDocumentTable.RenameDocument Method

Definition

Renames a document and optionally gives ownership of the document to the specified project.

public:
 void RenameDocument(System::String ^ oldName, System::String ^ newName, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pIVsHierarchy, System::UInt32 itemId);
public:
 void RenameDocument(Platform::String ^ oldName, Platform::String ^ newName, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pIVsHierarchy, unsigned int itemId);
void RenameDocument(std::wstring const & oldName, std::wstring const & newName, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pIVsHierarchy, unsigned int itemId);
public void RenameDocument (string oldName, string newName, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pIVsHierarchy, uint itemId);
member this.RenameDocument : string * string * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 -> unit
Public Sub RenameDocument (oldName As String, newName As String, pIVsHierarchy As IVsHierarchy, itemId As UInteger)

Parameters

oldName
String

[in] The full path representing the original name.

newName
String

[in] The full path representing the new name.

pIVsHierarchy
IVsHierarchy

[in] An IVsHierarchy object representing the project that is to take ownership of the document. Pass the value (IVsHierarchy)-1 to indicate no change in ownership is to take place

itemId
UInt32

[in] This value can be VSITEMID_NIL, VSITEMID_ROOT, or VSITEMID_SELECTION. Pass VSITEMID_NIL to indicate no change in ownership is to take place.

Remarks

This method renames the document. In addition, the owner of the document can be set or changed by specifying the IVsHierarchy object representing the project that is to take ownership.

Applies to