This documentation is archived and is not being maintained.

CodeModelEvents Interface

Defines events supported by the CodeModel object. Refer to CodeModelEventsClass for this object's documentation.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

[GuidAttribute("66ADC510-0CA2-475D-A343-57192BCE38BF")]
public interface CodeModelEvents : _CodeModelEvents, 
	_dispCodeModelEvents_Event

The CodeModelEvents type exposes the following members.

  NameDescription
Public methodadd_ElementAddedInfrastructure. Microsoft Internal Use Only. (Inherited from _dispCodeModelEvents_Event.)
Public methodadd_ElementChangedInfrastructure. Microsoft Internal Use Only. (Inherited from _dispCodeModelEvents_Event.)
Public methodadd_ElementDeletedInfrastructure. Microsoft Internal Use Only. (Inherited from _dispCodeModelEvents_Event.)
Public methodremove_ElementAddedInfrastructure. Microsoft Internal Use Only. (Inherited from _dispCodeModelEvents_Event.)
Public methodremove_ElementChangedInfrastructure. Microsoft Internal Use Only. (Inherited from _dispCodeModelEvents_Event.)
Public methodremove_ElementDeletedInfrastructure. Microsoft Internal Use Only. (Inherited from _dispCodeModelEvents_Event.)
Top

  NameDescription
Public eventElementAddedInfrastructure. Microsoft Internal Use Only. (Inherited from _dispCodeModelEvents_Event.)
Public eventElementChangedInfrastructure. Microsoft Internal Use Only. (Inherited from _dispCodeModelEvents_Event.)
Public eventElementDeletedInfrastructure. Microsoft Internal Use Only. (Inherited from _dispCodeModelEvents_Event.)
Top

NoteNote

The values of code model elements such as classes, structs, functions, attributes, delegates, and so forth can be non-deterministic after making certain kinds of edits, meaning that their values cannot be relied upon to always remain the same. For more information, see the section Code Model Element Values Can Change in Discovering Code by Using the Code Model (Visual Basic).

Dim WithEvents oCodeModelEvents As EnvDTE80.CodeModelEvents
Public Sub OnCodeElementAdded(ByVal NewElement As EnvDTE.CodeElement) _
  Handles oCodeModelEvents.ElementAdded
    MsgBox(NewElement.Name + "(Kind=" + Str(NewElement.Kind) + ") was _
      added.")
End Sub
Show: