IVsTrackProjectDocumentsEvents2.OnQueryRenameDirectories Method (IVsProject, Int32, String[], String[], VSQUERYRENAMEDIRECTORYFLAGS[], VSQUERYRENAMEDIRECTORYRESULTS[], VSQUERYRENAMEDIRECTORYRESULTS[])
This method notifies the client when a project has requested to rename directories.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int OnQueryRenameDirectories( IVsProject pProject, int cDirs, string[] rgszMkOldNames, string[] rgszMkNewNames, VSQUERYRENAMEDIRECTORYFLAGS[] rgFlags, VSQUERYRENAMEDIRECTORYRESULTS[] pSummaryResult, VSQUERYRENAMEDIRECTORYRESULTS[] rgResults )
Parameters
- pProject
-
Type:
Microsoft.VisualStudio.Shell.Interop.IVsProject
[in] Project requesting to rename directories.
- cDirs
-
Type:
System.Int32
[in] Number of directories to rename.
- rgszMkOldNames
-
Type:
System.String[]
[in] Array of paths for the old directory names.
- rgszMkNewNames
-
Type:
System.String[]
[in] Array of paths for the new directory names.
- rgFlags
-
Type:
Microsoft.VisualStudio.Shell.Interop.VSQUERYRENAMEDIRECTORYFLAGS[]
[in] Array of flags. For a list of rgFlags values, see VSQUERYRENAMEDIRECTORYFLAGS.
- pSummaryResult
-
Type:
Microsoft.VisualStudio.Shell.Interop.VSQUERYRENAMEDIRECTORYRESULTS[]
[out] Summary result object. This object is a summation of the yes and no results for the array of directories passed in rgszMkOldNames. If the result for a single directory is no, then pSummaryResult is equal to VSQUERYRENAMEDIRECTORYRESULTS_RenameNotOK; if the results for all files are yes, then pSummaryResult is equal to VSQUERYRENAMEDIRECTORYRESULTS_RenameOK. For a list of pSummaryResult values, see VSQUERYRENAMEDIRECTORYRESULTS.
- rgResults
-
Type:
Microsoft.VisualStudio.Shell.Interop.VSQUERYRENAMEDIRECTORYRESULTS[]
[out] Array of results. For a list of rgResults values, see VSQUERYRENAMEDIRECTORYRESULTS.
Return Value
Type: System.Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From IVsTrackProjectDocumentsEvents2.idl
HRESULT IVsTrackProjectDocumentsEvents2::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[] );
Use IVsTrackProjectDocumentsEvents2.OnQueryRenameDirectories to indicate whether specified directories can be renamed in the project. Deny a query only if allowing the operation would compromise your stable state. For example, source control denies rename queries if the new name conflicts with an existing directory already under source control.