Condividi tramite


WKInterfaceObject.Notifications.ObserveHearingDevicePairedEarDidChange Metodo

Definizione

Overload

ObserveHearingDevicePairedEarDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la HearingDevicePairedEarDidChangeNotification costante.

ObserveHearingDevicePairedEarDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la HearingDevicePairedEarDidChangeNotification costante.

ObserveHearingDevicePairedEarDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la HearingDevicePairedEarDidChangeNotification costante.

public static Foundation.NSObject ObserveHearingDevicePairedEarDidChange (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveHearingDevicePairedEarDidChange : Foundation.NSObject * EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject

Parametri

objectToObserve
NSObject

Oggetto da osservare.

handler
EventHandler<NSNotificationEventArgs>

Metodo da richiamare quando viene pubblicata la notifica.

Restituisce

Oggetto token che può essere usato per arrestare la ricezione delle notifiche eliminandolo o passandolo a RemoveObservers(IEnumerable<NSObject>)

Commenti

Questo metodo può essere usato per sottoscrivere HearingDevicePairedEarDidChangeNotification le notifiche.

// 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 ();

Si applica a

ObserveHearingDevicePairedEarDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la HearingDevicePairedEarDidChangeNotification costante.

public static Foundation.NSObject ObserveHearingDevicePairedEarDidChange (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveHearingDevicePairedEarDidChange : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject

Parametri

handler
EventHandler<NSNotificationEventArgs>

Metodo da richiamare quando viene pubblicata la notifica.

Restituisce

Oggetto token che può essere usato per arrestare la ricezione delle notifiche eliminandolo o passandolo a RemoveObservers(IEnumerable<NSObject>)

Commenti

Questo metodo può essere usato per sottoscrivere HearingDevicePairedEarDidChangeNotification le notifiche.

// 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 ();

Si applica a