MLModelCollection.Notifications.ObserveDidChange Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
| Nome | Descrizione |
|---|---|
| ObserveDidChange(EventHandler<NSNotificationEventArgs>) |
Obsoleti.
Questo metodo non esegue alcuna operazione e restituisce solo un'istanza segnaposto. |
| ObserveDidChange(NSObject, EventHandler<NSNotificationEventArgs>) |
Obsoleti.
Questo metodo non esegue alcuna operazione e restituisce solo un'istanza segnaposto. |
ObserveDidChange(EventHandler<NSNotificationEventArgs>)
Attenzione
This method does nothing.
Questo metodo non esegue alcuna operazione e restituisce solo un'istanza segnaposto.
public static Foundation.NSObject ObserveDidChange(EventHandler<Foundation.NSNotificationEventArgs> handler);
[System.Obsolete("This method does nothing.")]
public static Foundation.NSObject ObserveDidChange(EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveDidChange : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
[<System.Obsolete("This method does nothing.")>]
static member ObserveDidChange : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Parametri
- handler
- EventHandler<NSNotificationEventArgs>
Gestore che risponde alla notifica quando si verifica.
Valori restituiti
Oggetto token che può essere usato per interrompere la ricezione di notifiche eliminandolo o passandolo a RemoveObservers(IEnumerable<NSObject>).
- Attributi
Commenti
Questo metodo può essere usato per sottoscrivere DidChangeNotification le notifiche.
// Listen to all notifications posted for any object
var token = MLModelCollection.Notifications.ObserveDidChange ((notification) => {
Console.WriteLine ("Observed DidChangeNotification!");
};
// Stop listening for notifications
token.Dispose ();
Si applica a
ObserveDidChange(NSObject, EventHandler<NSNotificationEventArgs>)
Attenzione
This method does nothing.
Questo metodo non esegue alcuna operazione e restituisce solo un'istanza segnaposto.
public static Foundation.NSObject ObserveDidChange(Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
[System.Obsolete("This method does nothing.")]
public static Foundation.NSObject ObserveDidChange(Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveDidChange : Foundation.NSObject * EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
[<System.Obsolete("This method does nothing.")>]
static member ObserveDidChange : Foundation.NSObject * EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Parametri
- objectToObserve
- NSObject
Oggetto specifico da osservare.
- handler
- EventHandler<NSNotificationEventArgs>
Gestore che risponde alla notifica quando si verifica.
Valori restituiti
Oggetto token che può essere usato per interrompere la ricezione di notifiche eliminandolo o passandolo a RemoveObservers(IEnumerable<NSObject>).
- Attributi
Commenti
Questo metodo può essere usato per sottoscrivere DidChangeNotification le notifiche.
// Listen to all notifications posted for a single object
var token = MLModelCollection.Notifications.ObserveDidChange (objectToObserve, (notification) => {
Console.WriteLine ($"Observed DidChangeNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();