Click or drag to resize

MessageManagerSubscribeT Method

Subscribes to a message. If the subscriber implements the IDisposableObject interface, the MessageManager will automatically add the Unsubscribe(Object) method to the dispose event

Namespace:  Cauldron
Assembly:  Cauldron.Win32.WPF (in Cauldron.Win32.WPF.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static void Subscribe<T>(
	Object subscriber,
	Action<T> subscriptionHandler
)
where T : MessagingArgs

Parameters

subscriber
Type: SystemObject
The object that subscribes to a message
subscriptionHandler
Type: SystemActionT
The handler that will be invoked on message recieve

Type Parameters

T
The type of message to subscribe to
Exceptions
ExceptionCondition
ArgumentNullExceptionsubscriber is null
ArgumentNullExceptionsubscriptionHandler is null
See Also