NSTextStorage.Notifications.ObserveWillProcessEditing Metodo

Definizione

Overload

ObserveWillProcessEditing(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la costante .

ObserveWillProcessEditing(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la costante .

ObserveWillProcessEditing(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la costante .

public static Foundation.NSObject ObserveWillProcessEditing (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveWillProcessEditing : 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 le notifiche .

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

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

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

Si applica a

ObserveWillProcessEditing(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la costante .

public static Foundation.NSObject ObserveWillProcessEditing (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveWillProcessEditing : 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 le notifiche .

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

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

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

Si applica a