Partager via


NEDnsProxyManager.Notifications.ObserveProxyConfigurationDidChange Méthode

Définition

Surcharges

ObserveProxyConfigurationDidChange(EventHandler<NSNotificationEventArgs>)

Notification fortement typée pour la ProxyConfigurationDidChangeNotification constante.

ObserveProxyConfigurationDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notification fortement typée pour la ProxyConfigurationDidChangeNotification constante.

ObserveProxyConfigurationDidChange(EventHandler<NSNotificationEventArgs>)

Notification fortement typée pour la ProxyConfigurationDidChangeNotification constante.

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

Paramètres

Retours

Objet jeton qui peut être utilisé pour arrêter de recevoir des notifications en le supprimant ou en le transmettant à RemoveObservers(IEnumerable<NSObject>)

Remarques

Cette méthode peut être utilisée pour ProxyConfigurationDidChangeNotification s’abonner aux notifications.

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

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

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

S’applique à

ObserveProxyConfigurationDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notification fortement typée pour la ProxyConfigurationDidChangeNotification constante.

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

Paramètres

objectToObserve
NSObject

Retours

Objet jeton qui peut être utilisé pour arrêter de recevoir des notifications en le supprimant ou en le transmettant à RemoveObservers(IEnumerable<NSObject>)

Remarques

Cette méthode peut être utilisée pour ProxyConfigurationDidChangeNotification s’abonner aux notifications.

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

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

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

S’applique à