PostSharp6.2/API Reference/Post­Sharp.​Aspects Namespace/IEvent­Binding Interface/IEvent­Binding Methods/IEvent­Binding.​Invoke­Handler Method

IEventBinding.InvokeHandler Method

Invoke the Invoke semantic on the next node in the chain of invocation.

Namespace:  PostSharp.Aspects
Assembly:  PostSharp (in PostSharp.dll) Version: 6.2.13.0 (6.2.13.0)
Syntax
C#
Object InvokeHandler(
	ref Object instance,
	Delegate handler,
	Arguments arguments
)

Parameters

instance
Type: System.Object
Target instance on which the event is defined (null if the event is static).
handler
Type: System.Delegate
Handler to be removed from the event.
arguments
Type: PostSharp.Aspects.Arguments
Arguments with which the handler should be invoked.

Return Value

Type: Object
The value returned by the handler.
Remarks

The instance parameter is passed by reference so that instance methods of value types ( struct in C#) are allowed to change the value of the instance.


Note Note
The Invoke Event Handler semantic is different from normal event firing. Indeed, when you fire an event, all handlers that were added to this event are fired. However, the current method invokes only a single handler: the one passed to the handler parameter.
See Also