OnExecuteOperationInProjectItem Method (OperationBase)

Top  Previous  Next

This method must be overridden in order to perform the operation in the project item (file) received as parameter.

Signature

[VB.NET]

Sub OnExecuteOperationInProjectItem(ByVal adminOptions As AdminOptionsBase, ByVal userOptions As UserOptions, ByVal projectItem As EnvDTE.ProjectItem, ByVal startEditPoint As EnvDTE.EditPoint, ByVal endEditPoint As EnvDTE.EditPoint, ByVal designerHost As System.ComponentModel.Design.IDesignerHost, ByRef cancel As Boolean)

[C#]

void OnExecuteOperationInProjectItem(AdminOptionsBase adminOptions, UserOptions userOptions, EnvDTE.ProjectItem projectItem, EnvDTE.EditPoint startEditPoint, EnvDTE.EditPoint endEditPoint, System.ComponentModel.Design.IDesignerHost designerHost, ref bool cancel)

Parameters

  • adminOptions: the admin options used by the operation, if any.
  • userOptions: the user options used by the operation.
  • projectItem: the project item that is being processed.
  • startEditPoint: for operations that use text or code files, the EnvDTE.EditPoint that represents the start of the text document.
  • endEditPoint: for operations that use text or code files, the EnvDTE.EditPoint that represents the end of the text document.
  • designerHost: for operations that use designer files (forms or usercontrols), the System.ComponentModel.Design.IDesignerHost where to perform the operation. This class has a RootComponent property which represents the form or usercontrol component; if you cast this object to System.Windows.Forms.Form or System.Windows.Forms.UserControl then you will gain access to its Controls property that you can traverse recursively to access each control in the designer.
  • cancel: allows the method to cancel the operation if needed.