WKInterfaceObject.Notifications.ObserveHearingDevicePairedEarDidChange Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
ObserveHearingDevicePairedEarDidChange(NSObject, EventHandler<NSNotificationEventArgs>) |
Notification fortement typée pour la HearingDevicePairedEarDidChangeNotification constante. |
ObserveHearingDevicePairedEarDidChange(EventHandler<NSNotificationEventArgs>) |
Notification fortement typée pour la HearingDevicePairedEarDidChangeNotification constante. |
ObserveHearingDevicePairedEarDidChange(NSObject, EventHandler<NSNotificationEventArgs>)
Notification fortement typée pour la HearingDevicePairedEarDidChangeNotification constante.
public static Foundation.NSObject ObserveHearingDevicePairedEarDidChange (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveHearingDevicePairedEarDidChange : Foundation.NSObject * EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Paramètres
- objectToObserve
- NSObject
Objet à observer.
- handler
- EventHandler<NSNotificationEventArgs>
Méthode à appeler lorsque la notification est publiée.
Retours
Objet jeton qui peut être utilisé pour arrêter de recevoir des notifications en le supprimant ou en le transmettant à RemoveObservers(IEnumerable<NSObject>)
Remarques
Cette méthode peut être utilisée pour HearingDevicePairedEarDidChangeNotification s’abonner aux notifications.
// Listen to all notifications posted for any object
var token = WKInterfaceObject.Notifications.ObserveHearingDevicePairedEarDidChange ((notification) => {
Console.WriteLine ("Observed HearingDevicePairedEarDidChangeNotification!");
};
// Listen to all notifications posted for a single object
var token = WKInterfaceObject.Notifications.ObserveHearingDevicePairedEarDidChange (objectToObserve, (notification) => {
Console.WriteLine ($"Observed HearingDevicePairedEarDidChangeNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();
S’applique à
ObserveHearingDevicePairedEarDidChange(EventHandler<NSNotificationEventArgs>)
Notification fortement typée pour la HearingDevicePairedEarDidChangeNotification constante.
public static Foundation.NSObject ObserveHearingDevicePairedEarDidChange (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveHearingDevicePairedEarDidChange : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Paramètres
- handler
- EventHandler<NSNotificationEventArgs>
Méthode à appeler lorsque la notification est publiée.
Retours
Objet jeton qui peut être utilisé pour arrêter de recevoir des notifications en le supprimant ou en le transmettant à RemoveObservers(IEnumerable<NSObject>)
Remarques
Cette méthode peut être utilisée pour HearingDevicePairedEarDidChangeNotification s’abonner aux notifications.
// Listen to all notifications posted for any object
var token = WKInterfaceObject.Notifications.ObserveHearingDevicePairedEarDidChange ((notification) => {
Console.WriteLine ("Observed HearingDevicePairedEarDidChangeNotification!");
};
// Listen to all notifications posted for a single object
var token = WKInterfaceObject.Notifications.ObserveHearingDevicePairedEarDidChange (objectToObserve, (notification) => {
Console.WriteLine ($"Observed HearingDevicePairedEarDidChangeNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();