Edytuj

Udostępnij za pośrednictwem


AVRouteDetector.Notifications.ObserveMultipleRoutesDetectedDidChange Method

Definition

Overloads

ObserveMultipleRoutesDetectedDidChange(EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the P:AVFoundation.AVRouteDetector.MultipleRoutesDetectedDidChangeNotification constant.

ObserveMultipleRoutesDetectedDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the P:AVFoundation.AVRouteDetector.MultipleRoutesDetectedDidChangeNotification constant.

ObserveMultipleRoutesDetectedDidChange(EventHandler<NSNotificationEventArgs>)

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

Parameters

handler
EventHandler<NSNotificationEventArgs>

The handler that responds to the notification when it occurs.

Returns

Token object that can be used to stop receiving notifications by either disposing it or passing it to RemoveObservers(IEnumerable<NSObject>)

Remarks

This method can be used to subscribe for P:AVFoundation.AVRouteDetector.MultipleRoutesDetectedDidChangeNotification notifications.

// Listen to all notifications posted for any object
var token = AVRouteDetector.Notifications.ObserveMultipleRoutesDetectedDidChange ((notification) => {
	Console.WriteLine ("Observed MultipleRoutesDetectedDidChangeNotification!");
};

// Listen to all notifications posted for a single object
var token = AVRouteDetector.Notifications.ObserveMultipleRoutesDetectedDidChange (objectToObserve, (notification) => {
	Console.WriteLine ($"Observed MultipleRoutesDetectedDidChangeNotification for {nameof (objectToObserve)}!");
};

// Stop listening for notifications
token.Dispose ();

Applies to

ObserveMultipleRoutesDetectedDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

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

Parameters

objectToObserve
NSObject

The specific object to observe.

handler
EventHandler<NSNotificationEventArgs>

The handler that responds to the notification when it occurs.

Returns

Token object that can be used to stop receiving notifications by either disposing it or passing it to RemoveObservers(IEnumerable<NSObject>)

Remarks

This method can be used to subscribe for P:AVFoundation.AVRouteDetector.MultipleRoutesDetectedDidChangeNotification notifications.

// Listen to all notifications posted for any object
var token = AVRouteDetector.Notifications.ObserveMultipleRoutesDetectedDidChange ((notification) => {
	Console.WriteLine ("Observed MultipleRoutesDetectedDidChangeNotification!");
};

// Listen to all notifications posted for a single object
var token = AVRouteDetector.Notifications.ObserveMultipleRoutesDetectedDidChange (objectToObserve, (notification) => {
	Console.WriteLine ($"Observed MultipleRoutesDetectedDidChangeNotification for {nameof (objectToObserve)}!");
};

// Stop listening for notifications
token.Dispose ();

Applies to