RunningDocumentTable.RenameDocument Method

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

This API is not CLS-compliant. 

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
  Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)

Syntax

‘선언
<CLSCompliantAttribute(False)> _
Public Sub RenameDocument ( _
    oldName As String, _
    newName As String, _
    pIVsHierarchy As IVsHierarchy, _
    itemId As UInteger _
)
‘사용 방법
Dim instance As RunningDocumentTable
Dim oldName As String
Dim newName As String
Dim pIVsHierarchy As IVsHierarchy
Dim itemId As UInteger

instance.RenameDocument(oldName, newName, _
    pIVsHierarchy, itemId)
[CLSCompliantAttribute(false)]
public void RenameDocument(
    string oldName,
    string newName,
    IVsHierarchy pIVsHierarchy,
    uint itemId
)
[CLSCompliantAttribute(false)]
public:
void RenameDocument(
    String^ oldName, 
    String^ newName, 
    IVsHierarchy^ pIVsHierarchy, 
    unsigned int itemId
)
[<CLSCompliantAttribute(false)>]
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: System.String
    [in] The full path representing the original name.
  • newName
    Type: System.String
    [in] The full path representing the new name.

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

See Also

Reference

RunningDocumentTable Class

RunningDocumentTable Members

Microsoft.VisualStudio.Shell Namespace