Class TriggerEventDispatchExtensions
- Namespace
- Bunit
- Assembly
- Bunit.Web.dll
General event dispatch helper extension methods.
public static class TriggerEventDispatchExtensions
- Inheritance
-
TriggerEventDispatchExtensions
- Inherited Members
Methods
TriggerEvent(IElement, string, EventArgs)
Raises the event eventName
on the element element
passing the eventArgs
to the event handler.
public static void TriggerEvent(this IElement element, string eventName, EventArgs eventArgs)
Parameters
element
IElementThe element to raise the event on.
eventName
stringThe name of the event to raise (using on-form, e.g.
onclick
).eventArgs
EventArgsThe event arguments to pass to the event handler. Use Empty to pass an empty EventArgs.
TriggerEventAsync(IElement, string, EventArgs)
Raises the event eventName
on the element element
passing the eventArgs
to the event handler.
public static Task TriggerEventAsync(this IElement element, string eventName, EventArgs eventArgs)
Parameters
element
IElementThe element to raise the event on.
eventName
stringThe name of the event to raise (using on-form, e.g.
onclick
).eventArgs
EventArgsThe event arguments to pass to the event handler.