Open sandboxFocus

Method OverrideAdd

OverrideAdd(dynamic)

Template method for overriding the event add accessor.

Declaration
[Template(IsEmpty = true)]
public virtual void OverrideAdd(dynamic handler)
Parameters
Type Name Description
dynamic handler

The event handler being added. Use dynamic to support any delegate type.

Remarks

This template method is optional (marked with [Template(IsEmpty = true)]). If not overridden, the default add behavior is used.

Within the template, use meta.Target.Event to access event metadata. To delegate to the original add implementation, use meta.Target.Event.Add(handler) or meta.Proceed().