RunningDocumentTable.RenameDocument Method
Renames a document and optionally gives ownership of the document to the specified project.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
Public Sub RenameDocument ( _
oldName As String, _
newName As String, _
pIVsHierarchy As IVsHierarchy, _
itemId As UInteger _
)
public void RenameDocument(
string oldName,
string newName,
IVsHierarchy pIVsHierarchy,
uint itemId
)
public:
void RenameDocument(
String^ oldName,
String^ newName,
IVsHierarchy^ pIVsHierarchy,
unsigned int itemId
)
member RenameDocument :
oldName:string *
newName:string *
pIVsHierarchy:IVsHierarchy *
itemId:uint32 -> unit
public function RenameDocument(
oldName : String,
newName : String,
pIVsHierarchy : IVsHierarchy,
itemId : uint
)
Parameters
oldName
Type: String[in] The full path representing the original name.
newName
Type: String[in] The full path representing the new name.
pIVsHierarchy
Type: Microsoft.VisualStudio.Shell.Interop.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
Type: 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.