Поделиться через


VCCodeEvent - интерфейс

An object representing an event code element (declared with the __event keyword).

Пространство имен:  Microsoft.VisualStudio.VCCodeModel
Сборка:  Microsoft.VisualStudio.VCCodeModel (в Microsoft.VisualStudio.VCCodeModel.dll)

Синтаксис

'Декларация
<GuidAttribute("17730D5C-271F-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeEvent
'Применение
Dim instance As VCCodeEvent
[GuidAttribute("17730D5C-271F-11D7-8BF6-00B0D03DAA06")]
public interface VCCodeEvent
[GuidAttribute(L"17730D5C-271F-11D7-8BF6-00B0D03DAA06")]
public interface class VCCodeEvent
public interface VCCodeEvent

Заметки

The VCCodeEvent object represents an event code element in a source file, allowing modification or access to information about that specific code element.

See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.

Примеры

This example retrieves all events of the first class and displays their names in a message box.

Sub GetEvents()
    Dim vcCM As VCCodeModel
    Dim vcClass As VCCodeClass
    Dim vcEvent as VCCodeEvent
    vcCM = DTE.Solution.Item(1).CodeModel
    vcClass = vcCM.Classes.Item(1)
    For Each vcEvent in vcClass.Events
        MsgBox(vcEvent.DisplayName)
    Next
End Sub

См. также

Ссылки

VCCodeEvent - члены

Microsoft.VisualStudio.VCCodeModel - пространство имен