Share via


AVAsset.WasDefragmentedNotification Proprietà

Definizione

Costante di notifica per WasDefragmented

[Foundation.Advice("Use AVAsset.Notifications.ObserveWasDefragmented helper method instead.")]
[Foundation.Field("AVAssetWasDefragmentedNotification", "AVFoundation")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 11, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 12, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 12, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static Foundation.NSString WasDefragmentedNotification { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 11, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 12, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 12, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.WasDefragmentedNotification : Foundation.NSString

Valore della proprietà

La costante NSString deve essere usata come token per NSNotificationCenter.

Attributi

Commenti

Questa costante può essere usata con per NSNotificationCenter registrare un listener per questa notifica, anche gli sviluppatori possono usare la notifica ObserveWasDefragmented fortemente tipizzata. Si tratta di un NSString anziché di una stringa, perché questi valori possono essere usati come token in alcune librerie native anziché essere usati esclusivamente per il contenuto stringa effettivo. Il parametro 'notification' del callback contiene informazioni aggiuntive specifiche per il tipo di notifica.

// Lambda style
NSNotificationCenter.DefaultCenter.AddObserver (
        AVAsset.WasDefragmentedNotification, (notification) => {Console.WriteLine ("Received the notification AVAsset", notification); }


// Method style
void Callback (NSNotification notification)
{
    Console.WriteLine ("Received a notification AVAsset", notification);
}

void Setup ()
{
    NSNotificationCenter.DefaultCenter.AddObserver (AVAsset.WasDefragmentedNotification, Callback);
}

Si applica a