다음을 통해 공유


NEDnsProxyManager.Notifications.ObserveProxyConfigurationDidChange 메서드

정의

오버로드

ObserveProxyConfigurationDidChange(EventHandler<NSNotificationEventArgs>)

상수에 대한 강력한 형식의 알림입니다 ProxyConfigurationDidChangeNotification .

ObserveProxyConfigurationDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

상수에 대한 강력한 형식의 알림입니다 ProxyConfigurationDidChangeNotification .

ObserveProxyConfigurationDidChange(EventHandler<NSNotificationEventArgs>)

상수에 대한 강력한 형식의 알림입니다 ProxyConfigurationDidChangeNotification .

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

매개 변수

반환

토큰 개체를 삭제하거나 전달하여 알림 수신을 중지하는 데 사용할 수 있는 토큰 개체 RemoveObservers(IEnumerable<NSObject>)

설명

이 메서드를 사용하여 알림을 구독 ProxyConfigurationDidChangeNotification 할 수 있습니다.

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

적용 대상

ObserveProxyConfigurationDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

상수에 대한 강력한 형식의 알림입니다 ProxyConfigurationDidChangeNotification .

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

매개 변수

objectToObserve
NSObject

반환

토큰 개체를 삭제하거나 전달하여 알림 수신을 중지하는 데 사용할 수 있는 토큰 개체 RemoveObservers(IEnumerable<NSObject>)

설명

이 메서드를 사용하여 알림을 구독 ProxyConfigurationDidChangeNotification 할 수 있습니다.

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

적용 대상