Share via


AVAsset.Notifications.ObserveWasDefragmented Metodo

Definizione

Overload

ObserveWasDefragmented(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la WasDefragmentedNotification costante.

ObserveWasDefragmented(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la WasDefragmentedNotification costante.

ObserveWasDefragmented(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la WasDefragmentedNotification costante.

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

Parametri

Restituisce

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

Commenti

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

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

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

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

Si applica a

ObserveWasDefragmented(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la WasDefragmentedNotification costante.

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

Parametri

objectToObserve
NSObject

Restituisce

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

Commenti

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

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

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

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

Si applica a