Udostępnij za pośrednictwem


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);
[<System.Runtime.InteropServices.DispId(201)>]
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

Required. Name of the interface event to add.

FullDelegateName
String

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

CreatePropertyStyleEvent
Boolean

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

Position
Object

Optional. Location of the event in code.

Access
vsCMAccess

Optional. A vsCMAccess constant.

Returns

Returns the interface event created.

Attributes

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