IVsHierarchyDeleteHandler2 Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deletes one or more items in a solution hierarchy. The interface extends, but does not inherit from, IVsHierarchyDeleteHandler. Needed only if you want your package to use its own deletion prompt.
public interface class IVsHierarchyDeleteHandler2
public interface class IVsHierarchyDeleteHandler2
__interface IVsHierarchyDeleteHandler2
[System.Runtime.InteropServices.Guid("78FD1CBD-387B-4262-BD7B-65C34F86356E")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsHierarchyDeleteHandler2
[<System.Runtime.InteropServices.Guid("78FD1CBD-387B-4262-BD7B-65C34F86356E")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsHierarchyDeleteHandler2 = interface
Public Interface IVsHierarchyDeleteHandler2
- Attributes
Remarks
There are two general scenarios: either all of the selected items belong to a single project or they belong to multiple projects.
If all of the selected items belong to one project:
The shell builds the reduced list of items.
The shell calls ShowSpecificDeleteRemoveMessage if the hierarchy supports IVsHierarchyDeleteHandler2.
The project shows its own message, if desired, and returns whether it wants the standard message shown. If the project wants the standard message, it gets shown.
Next, the shell calls the DeleteItem method of the IVsHierarchyDeleteHandler interface.
If the selected items belong to multiple projects:
The shell builds the reduced list of items.
The shell shows the standard message for multiple project selection.
The shell then calls ShowMultiSelDeleteOrRemoveMessage on any hierarchy that supports IVsHierarchyDeleteHandler2. At this point, the operation has already been chosen (whether Delete or Remove) and the projects are simply confirming the action.
If the projects allow the operation to continue (returns
false
in the pfCancelOperation parameter of the ShowMultiSelDeleteOrRemoveMessage method), the shell calls the DeleteItem method of the IVsHierarchyDeleteHandler as usual.
In either case, the project needs to show the correct message UI by including buttons for delete and remove if it performs deletions or removals.
Methods
ShowMultiSelDeleteOrRemoveMessage(UInt32, UInt32, UInt32[], Int32) |
Displays the multiple selection delete or remove message. |
ShowSpecificDeleteRemoveMessage(UInt32, UInt32, UInt32[], Int32, UInt32) |
Shows a specific delete or remove message. |