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)
‘선언
Function OnQueryRenameDirectories ( _
pProject As IVsProject, _
cDirs As Integer, _
rgszMkOldNames As String(), _
rgszMkNewNames As String(), _
rgFlags As VSQUERYRENAMEDIRECTORYFLAGS(), _
<OutAttribute> pSummaryResult As VSQUERYRENAMEDIRECTORYRESULTS(), _
<OutAttribute> rgResults As VSQUERYRENAMEDIRECTORYRESULTS() _
) As Integer
‘사용 방법
Dim instance As IVsTrackProjectDocuments2
Dim pProject As IVsProject
Dim cDirs As Integer
Dim rgszMkOldNames As String()
Dim rgszMkNewNames As String()
Dim rgFlags As VSQUERYRENAMEDIRECTORYFLAGS()
Dim pSummaryResult As VSQUERYRENAMEDIRECTORYRESULTS()
Dim rgResults As VSQUERYRENAMEDIRECTORYRESULTS()
Dim returnValue As Integer
returnValue = instance.OnQueryRenameDirectories(pProject, _
cDirs, rgszMkOldNames, rgszMkNewNames, _
rgFlags, pSummaryResult, rgResults)
int OnQueryRenameDirectories(
IVsProject pProject,
int cDirs,
string[] rgszMkOldNames,
string[] rgszMkNewNames,
VSQUERYRENAMEDIRECTORYFLAGS[] rgFlags,
VSQUERYRENAMEDIRECTORYRESULTS[] pSummaryResult,
VSQUERYRENAMEDIRECTORYRESULTS[] rgResults
)
int OnQueryRenameDirectories(
[InAttribute] IVsProject^ pProject,
[InAttribute] int cDirs,
[InAttribute] array<String^>^ rgszMkOldNames,
[InAttribute] array<String^>^ rgszMkNewNames,
[InAttribute] array<VSQUERYRENAMEDIRECTORYFLAGS>^ rgFlags,
[OutAttribute] array<VSQUERYRENAMEDIRECTORYRESULTS>^ pSummaryResult,
[OutAttribute] array<VSQUERYRENAMEDIRECTORYRESULTS>^ rgResults
)
abstract OnQueryRenameDirectories :
pProject:IVsProject *
cDirs:int *
rgszMkOldNames:string[] *
rgszMkNewNames:string[] *
rgFlags:VSQUERYRENAMEDIRECTORYFLAGS[] *
pSummaryResult:VSQUERYRENAMEDIRECTORYRESULTS[] byref *
rgResults:VSQUERYRENAMEDIRECTORYRESULTS[] byref -> int
function OnQueryRenameDirectories(
pProject : IVsProject,
cDirs : int,
rgszMkOldNames : String[],
rgszMkNewNames : String[],
rgFlags : VSQUERYRENAMEDIRECTORYFLAGS[],
pSummaryResult : VSQUERYRENAMEDIRECTORYRESULTS[],
rgResults : VSQUERYRENAMEDIRECTORYRESULTS[]
) : int
- pProject
Type: Microsoft.VisualStudio.Shell.Interop.IVsProject
[in] Project containing the directories to rename.
- 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.
- rgFlags
Type: array<Microsoft.VisualStudio.Shell.Interop.VSQUERYRENAMEDIRECTORYFLAGS[]
[in] Array of flags. For a list of rgFlags values, see VSQUERYRENAMEDIRECTORYFLAGS
- pSummaryResult
Type: array<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: array<Microsoft.VisualStudio.Shell.Interop.VSQUERYRENAMEDIRECTORYRESULTS[]
[out] Array of results. For a list of rgResults values, see VSQUERYRENAMEDIRECTORYRESULTS.참고
If you pass in nulla null reference (Nothing in Visual Basic) for this parameter, then only the summary result will be returned (pSummaryResult).
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.
- 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.
IVsTrackProjectDocuments2 Interface