WiFiDirectServiceAdvertiser.SessionRequested Ereignis
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Deprecated. Ereignis ausgelöst, wenn ein Seeker angefordert hat, dass eine Sitzung mit dem Dienst eingerichtet wird, der dieser WiFiDirectServiceAdvertiser-Instanz zugeordnet ist. Rufen Sie wiFiDirectServiceAdvertiser.ConnectAsync in Ihrem Ereignishandler auf, um die Anforderung zu akzeptieren.
// Register
event_token SessionRequested(TypedEventHandler<WiFiDirectServiceAdvertiser, WiFiDirectServiceSessionRequestedEventArgs const&> const& handler) const;
// Revoke with event_token
void SessionRequested(event_token const* cookie) const;
// Revoke with event_revoker
WiFiDirectServiceAdvertiser::SessionRequested_revoker SessionRequested(auto_revoke_t, TypedEventHandler<WiFiDirectServiceAdvertiser, WiFiDirectServiceSessionRequestedEventArgs const&> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("IWiFiDirectServiceAdvertiser is deprecated and might not work on all platforms. For more info, see Microsoft Learn.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 1245184, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("IWiFiDirectServiceAdvertiser is deprecated and might not work on all platforms. For more info, see Microsoft Learn.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 1245184, "Windows.Foundation.UniversalApiContract")]
// Register
event_token SessionRequested(TypedEventHandler<WiFiDirectServiceAdvertiser, WiFiDirectServiceSessionRequestedEventArgs const&> const& handler) const;
// Revoke with event_token
void SessionRequested(event_token const* cookie) const;
// Revoke with event_revoker
WiFiDirectServiceAdvertiser::SessionRequested_revoker SessionRequested(auto_revoke_t, TypedEventHandler<WiFiDirectServiceAdvertiser, WiFiDirectServiceSessionRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<WiFiDirectServiceAdvertiser,WiFiDirectServiceSessionRequestedEventArgs> SessionRequested;
[add: Windows.Foundation.Metadata.Deprecated("IWiFiDirectServiceAdvertiser is deprecated and might not work on all platforms. For more info, see Microsoft Learn.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 1245184, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("IWiFiDirectServiceAdvertiser is deprecated and might not work on all platforms. For more info, see Microsoft Learn.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 1245184, "Windows.Foundation.UniversalApiContract")]
public event TypedEventHandler<WiFiDirectServiceAdvertiser,WiFiDirectServiceSessionRequestedEventArgs> SessionRequested;
function onSessionRequested(eventArgs) { /* Your code */ }
wiFiDirectServiceAdvertiser.addEventListener("sessionrequested", onSessionRequested);
wiFiDirectServiceAdvertiser.removeEventListener("sessionrequested", onSessionRequested);
- or -
wiFiDirectServiceAdvertiser.onsessionrequested = onSessionRequested;
Public Custom Event SessionRequested As TypedEventHandler(Of WiFiDirectServiceAdvertiser, WiFiDirectServiceSessionRequestedEventArgs)
Ereignistyp
- Attribute