Compartir a través de


SKCloudServiceController.Notifications.ObserveStorefrontCountryCodeDidChange Método

Definición

Sobrecargas

ObserveStorefrontCountryCodeDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la StorefrontCountryCodeDidChangeNotification constante.

ObserveStorefrontCountryCodeDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la StorefrontCountryCodeDidChangeNotification constante.

ObserveStorefrontCountryCodeDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la StorefrontCountryCodeDidChangeNotification constante.

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

Parámetros

handler
EventHandler<NSNotificationEventArgs>

Método que se invoca cuando se publica la notificación.

Devoluciones

Objeto token que se puede usar para dejar de recibir notificaciones mediante su eliminación o su paso a RemoveObservers(IEnumerable<NSObject>)

Comentarios

Este método se puede usar para suscribirse StorefrontCountryCodeDidChangeNotification a las notificaciones.

// 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 ();

Se aplica a

ObserveStorefrontCountryCodeDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la StorefrontCountryCodeDidChangeNotification constante.

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

Parámetros

objectToObserve
NSObject

Objeto que se va a observar.

handler
EventHandler<NSNotificationEventArgs>

Método que se invoca cuando se publica la notificación.

Devoluciones

Objeto token que se puede usar para dejar de recibir notificaciones mediante su eliminación o su paso a RemoveObservers(IEnumerable<NSObject>)

Comentarios

Este método se puede usar para suscribirse StorefrontCountryCodeDidChangeNotification a las notificaciones.

// 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 ();

Se aplica a