Condividi tramite


SKCloudServiceController.Notifications.ObserveStorefrontCountryCodeDidChange Metodo

Definizione

Overload

ObserveStorefrontCountryCodeDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la StorefrontCountryCodeDidChangeNotification costante.

ObserveStorefrontCountryCodeDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la StorefrontCountryCodeDidChangeNotification costante.

ObserveStorefrontCountryCodeDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la StorefrontCountryCodeDidChangeNotification costante.

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

Parametri

handler
EventHandler<NSNotificationEventArgs>

Metodo da richiamare quando viene inviata la notifica.

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 StorefrontCountryCodeDidChangeNotification le notifiche.

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

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

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

Si applica a

ObserveStorefrontCountryCodeDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la StorefrontCountryCodeDidChangeNotification costante.

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

Parametri

objectToObserve
NSObject

Oggetto da osservare.

handler
EventHandler<NSNotificationEventArgs>

Metodo da richiamare quando viene inviata la notifica.

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 StorefrontCountryCodeDidChangeNotification le notifiche.

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

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

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

Si applica a