Udostępnij za pośrednictwem


EventSource.RaiseEvent<TEventArgs>(Object, TEventArgs, String) Method

Definition

Raises the event identified by key. All event handlers are called, regardless of whether an individual handler throws an exception.

template <typename TEventArgs>
 where TEventArgs : EventArgs int RaiseEvent(winrt::Windows::Foundation::IInspectable const & sender, TEventArgs eventArgs, std::wstring const & key = "");
protected int RaiseEvent<TEventArgs> (object sender, TEventArgs eventArgs, string key = "") where TEventArgs : EventArgs;
member this.RaiseEvent : obj * 'EventArgs * string -> int (requires 'EventArgs :> EventArgs)
Protected Function RaiseEvent(Of TEventArgs As EventArgs) (sender As Object, eventArgs As TEventArgs, Optional key As String = "") As Integer

Type Parameters

TEventArgs

The type of the argument passed with the event.

Parameters

sender
Object

The sender.

eventArgs
TEventArgs

The arguments to pass with the event

key
String

The key identifying the event to send

Returns

The HRESULT for the event

Applies to