CodeInterface2.AddEvent(String, String, Boolean, Object, vsCMAccess) CodeInterface2.AddEvent(String, String, Boolean, Object, vsCMAccess) CodeInterface2.AddEvent(String, String, Boolean, Object, vsCMAccess) CodeInterface2.AddEvent(String, String, Boolean, Object, vsCMAccess) Method

Definition

Adds an interface event.

EnvDTE80::CodeEvent AddEvent(std::wstring const & Name, std::wstring const & FullDelegateName, bool CreatePropertyStyleEvent = false, winrt::Windows::Foundation::IInspectable const & Position, EnvDTE::vsCMAccess Access = EnvDTE.vsCMAccess.vsCMAccessDefault);
[System.Runtime.InteropServices.DispId(201)]
public EnvDTE80.CodeEvent AddEvent (string Name, string FullDelegateName, bool CreatePropertyStyleEvent = false, object Position, EnvDTE.vsCMAccess Access = EnvDTE.vsCMAccess.vsCMAccessDefault);
abstract member AddEvent : string * string * bool * obj * EnvDTE.vsCMAccess -> EnvDTE80.CodeEvent
Public Function AddEvent (Name As String, FullDelegateName As String, Optional CreatePropertyStyleEvent As Boolean = false, Optional Position As Object, Optional Access As vsCMAccess = EnvDTE.vsCMAccess.vsCMAccessDefault) As CodeEvent
Parameters
Name
String String String String

Required. Name of the interface event to add.

FullDelegateName
String String String String

Required. Name of the delegate to base the event on.

CreatePropertyStyleEvent
Boolean Boolean Boolean Boolean

Optional. Creates an event that has a property style accessor.

Position
Object Object Object Object

Optional. Location of the event in code.

Access
vsCMAccess vsCMAccess vsCMAccess vsCMAccess

Optional. A vsCMAccess constant.

Returns

Returns the interface event created.

Remarks

Note

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.

Applies to