MonobjcMonobjc Documented Class Library
AddObserverSelectorNameObjectSuspensionBehavior Method (notificationObserver, notificationSelector, notificationName, notificationSender, suspendedDeliveryBehavior)
NamespacesMonobjc.FoundationNSDistributedNotificationCenterAddObserverSelectorNameObjectSuspensionBehavior(Id, IntPtr, NSString, NSString, NSNotificationSuspensionBehavior)

Adds an entry to the receiver’s dispatch table with a specific observer and suspended-notifications behavior, and optional notification name and sender.

Original signature is '- (void)addObserver:(id)notificationObserver selector:(SEL)notificationSelector name:(NSString *)notificationName object:(NSString *)notificationSender suspensionBehavior:(NSNotificationSuspensionBehavior)suspendedDeliveryBehavior'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual void AddObserverSelectorNameObjectSuspensionBehavior(
	Id notificationObserver,
	IntPtr notificationSelector,
	NSString notificationName,
	NSString notificationSender,
	NSNotificationSuspensionBehavior suspendedDeliveryBehavior
)
Public Overridable Sub AddObserverSelectorNameObjectSuspensionBehavior ( _
	notificationObserver As Id, _
	notificationSelector As IntPtr, _
	notificationName As NSString, _
	notificationSender As NSString, _
	suspendedDeliveryBehavior As NSNotificationSuspensionBehavior _
)
public:
virtual void AddObserverSelectorNameObjectSuspensionBehavior(
	Id^ notificationObserver, 
	IntPtr notificationSelector, 
	NSString^ notificationName, 
	NSString^ notificationSender, 
	NSNotificationSuspensionBehavior suspendedDeliveryBehavior
)
Parameters
notificationObserver (Id)
Object registering as an observer. Must not be nil.
notificationSelector (IntPtr)
Selector that specifies the message the receiver sends notificationObserver to notify it of the notification posting. Must not be 0.
notificationName (NSString)
The name of the notification for which to register the observer; that is, only notifications with this name are delivered to the observer. When nil, the notification center doesn’t use a notification’s name to decide whether to deliver it to the observer.
notificationSender (NSString)
The object whose notifications the observer wants to receive; that is, only notifications sent by this sender are delivered to the observer. When nil, the notification center doesn’t use a notification’s sender to decide whether to deliver it to the observer.
suspendedDeliveryBehavior (NSNotificationSuspensionBehavior)
Notification posting behavior when notification delivery is suspended.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)