Share via


SignalNotifier.AttachToEvent Method

Definition

Overloads

AttachToEvent(String, SignalHandler)

Attaches a SignalHandler delegate to an event. The delegated method will run the next time the event occurs.

AttachToEvent(String, SignalHandler, TimeSpan)

Attaches a SignalHandler delegate to an event. The delegated method will run if the event occurs or the time span elapses, whichever comes first.

AttachToEvent(String, SignalHandler)

Attaches a SignalHandler delegate to an event. The delegated method will run the next time the event occurs.

public:
 static SignalNotifier ^ AttachToEvent(Platform::String ^ name, SignalHandler ^ handler);
/// [Windows.Foundation.Metadata.Overload("AttachToEvent")]
 static SignalNotifier AttachToEvent(winrt::hstring const& name, SignalHandler const& handler);
[Windows.Foundation.Metadata.Overload("AttachToEvent")]
public static SignalNotifier AttachToEvent(string name, SignalHandler handler);
function attachToEvent(name, handler)
Public Shared Function AttachToEvent (name As String, handler As SignalHandler) As SignalNotifier

Parameters

name
String

Platform::String

winrt::hstring

Indicates the event that causes the method to run.

handler
SignalHandler

Indicates the method that will run in response to the event.

Returns

The resulting SignalNotifier object.

Attributes

See also

Applies to

AttachToEvent(String, SignalHandler, TimeSpan)

Attaches a SignalHandler delegate to an event. The delegated method will run if the event occurs or the time span elapses, whichever comes first.

public:
 static SignalNotifier ^ AttachToEvent(Platform::String ^ name, SignalHandler ^ handler, TimeSpan timeout);
/// [Windows.Foundation.Metadata.Overload("AttachToEventWithTimeout")]
 static SignalNotifier AttachToEvent(winrt::hstring const& name, SignalHandler const& handler, TimeSpan const& timeout);
[Windows.Foundation.Metadata.Overload("AttachToEventWithTimeout")]
public static SignalNotifier AttachToEvent(string name, SignalHandler handler, System.TimeSpan timeout);
function attachToEvent(name, handler, timeout)
Public Shared Function AttachToEvent (name As String, handler As SignalHandler, timeout As TimeSpan) As SignalNotifier

Parameters

name
String

Platform::String

winrt::hstring

Indicates the event that causes the method to run.

handler
SignalHandler

Indicates the method that will run in response to the event, or when the time span elapses, whichever comes first.

timeout
TimeSpan TimeSpan

Indicates the amount of time to continue waiting for the event before running the handler method.

Returns

The resulting SignalNotifier object.

Attributes

See also

Applies to