Compartir a través de


IVsTrackProjectDocumentsEvents2.OnQueryRemoveDirectories Method

This method notifies the client when a project has requested to remove directories.

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

Syntax

'Declaración
Function OnQueryRemoveDirectories ( _
    pProject As IVsProject, _
    cDirectories As Integer, _
    rgpszMkDocuments As String(), _
    rgFlags As VSQUERYREMOVEDIRECTORYFLAGS(), _
    <OutAttribute> pSummaryResult As VSQUERYREMOVEDIRECTORYRESULTS(), _
    <OutAttribute> rgResults As VSQUERYREMOVEDIRECTORYRESULTS() _
) As Integer
'Uso
Dim instance As IVsTrackProjectDocumentsEvents2
Dim pProject As IVsProject
Dim cDirectories As Integer
Dim rgpszMkDocuments As String()
Dim rgFlags As VSQUERYREMOVEDIRECTORYFLAGS()
Dim pSummaryResult As VSQUERYREMOVEDIRECTORYRESULTS()
Dim rgResults As VSQUERYREMOVEDIRECTORYRESULTS()
Dim returnValue As Integer

returnValue = instance.OnQueryRemoveDirectories(pProject, _
    cDirectories, rgpszMkDocuments, _
    rgFlags, pSummaryResult, rgResults)
int OnQueryRemoveDirectories(
    IVsProject pProject,
    int cDirectories,
    string[] rgpszMkDocuments,
    VSQUERYREMOVEDIRECTORYFLAGS[] rgFlags,
    VSQUERYREMOVEDIRECTORYRESULTS[] pSummaryResult,
    VSQUERYREMOVEDIRECTORYRESULTS[] rgResults
)
int OnQueryRemoveDirectories(
    [InAttribute] IVsProject^ pProject, 
    [InAttribute] int cDirectories, 
    [InAttribute] array<String^>^ rgpszMkDocuments, 
    [InAttribute] array<VSQUERYREMOVEDIRECTORYFLAGS>^ rgFlags, 
    [OutAttribute] array<VSQUERYREMOVEDIRECTORYRESULTS>^ pSummaryResult, 
    [OutAttribute] array<VSQUERYREMOVEDIRECTORYRESULTS>^ rgResults
)
abstract OnQueryRemoveDirectories : 
        pProject:IVsProject * 
        cDirectories:int * 
        rgpszMkDocuments:string[] * 
        rgFlags:VSQUERYREMOVEDIRECTORYFLAGS[] * 
        pSummaryResult:VSQUERYREMOVEDIRECTORYRESULTS[] byref * 
        rgResults:VSQUERYREMOVEDIRECTORYRESULTS[] byref -> int 
function OnQueryRemoveDirectories(
    pProject : IVsProject, 
    cDirectories : int, 
    rgpszMkDocuments : String[], 
    rgFlags : VSQUERYREMOVEDIRECTORYFLAGS[], 
    pSummaryResult : VSQUERYREMOVEDIRECTORYRESULTS[], 
    rgResults : VSQUERYREMOVEDIRECTORYRESULTS[]
) : int

Parameters

  • cDirectories
    Type: System.Int32
    [in] Number of directories to remove.
  • rgpszMkDocuments
    Type: array<System.String[]
    [in] Array of paths for the directories to remove.

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 IVsTrackProjectDocumentsEvents2.idl

HRESULT IVsTrackProjectDocumentsEvents2::OnQueryRemoveDirectories(
   [in] IVsProject *pProject,
   [in] int cDirectories,
   [in, size_is(cDirectories)] const LPCOLESTR rgpszMkDocuments[],
   [in, size_is(cDirectories)] const VSQUERYREMOVEDIRECTORYFLAGS rgFlags[],
   [out] VSQUERYREMOVEDIRECTORYRESULTS *pSummaryResult,
   [out, size_is(cDirectories)] VSQUERYREMOVEDIRECTORYRESULTS rgResults[]
);

Use IVsTrackProjectDocumentsEvents2.OnQueryRemoveDirectories to indicate whether specified directories can be removed from the project. Deny a query only if allowing the operation would compromise your stable state. For example, source control may deny remove queries if a directory contains files currently checked out of source control.

.NET Framework Security

See Also

Reference

IVsTrackProjectDocumentsEvents2 Interface

IVsTrackProjectDocumentsEvents2 Members

Microsoft.VisualStudio.Shell.Interop Namespace