IVsTrackProjectDocuments2.OnQueryRenameDirectories Method

This method is called by a project to determine whether directories in the project can be renamed.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

int OnQueryRenameDirectories(
    IVsProject pProject,
    int cDirs,
    string[] rgszMkOldNames,
    string[] rgszMkNewNames,
    VSQUERYRENAMEDIRECTORYFLAGS[] rgFlags,
    VSQUERYRENAMEDIRECTORYRESULTS[] pSummaryResult,
    VSQUERYRENAMEDIRECTORYRESULTS[] rgResults
)

Parameters

  • cDirs
    Type: System.Int32
    [in] Number of directories to be renamed.
  • rgszMkOldNames
    Type: array<System.String[]
    [in] Array of paths for the old directory names.
  • rgszMkNewNames
    Type: array<System.String[]
    [in] Array of paths for the new directory names.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From IVsTrackProjectDocuments2.idl

HRESULT IVsTrackProjectDocuments2::OnQueryRenameDirectories(
   [in] IVsProject *pProject,
   [in] int cDirs,
   [in, size_is(cDirs)] const LPCOLESTR rgszMkOldNames[],
   [in, size_is(cDirs)] const LPCOLESTR rgszMkNewNames[],
   [in, size_is(cDirs)] const VSQUERYRENAMEDIRECTORYFLAGS rgflags[],
   [out] VSQUERYRENAMEDIRECTORYRESULTS *pSummaryResult,
   [out, size_is(cDirs)] VSQUERYRENAMEDIRECTORYRESULTS rgResults[]
);

Call IVsTrackProjectDocuments2.OnQueryRenameDirectories when you want to rename directories in the project. This method must be called before the directories are renamed. The environment will return a flag indicating which directories can be renamed. After you have received authorization to rename the directories and you have renamed the directories, call OnAfterRenameDirectories to confirm that the directories have been renamed.

참고

All directory calls are optional. However, if you call one of the OnQuery* directory methods, then you are required to call the corresponding OnAfter* directory method if the OnQuery* call was successful.

.NET Framework Security

See Also

Reference

IVsTrackProjectDocuments2 Interface

IVsTrackProjectDocuments2 Members

Microsoft.VisualStudio.Shell.Interop Namespace