Trigger¶
Triggers a new event with the input data and returns the IDs of triggered listener work items.
$Domain.Trigger(eventName: string, inputData: ( string | Xml )):Array<string> (Xml)
Parameters¶
string eventName
The name of the event to trigger. Multiple events can be specified with a ";" delimiter.
( string | Xml ) inputData
The input data to be sent to listeners.
Returns¶
An array of the IDs of the triggered listener work items.
Remarks¶
If the input data is not an instance of Xml or a string, an exception is thrown.
Each listener is invoked in the current domain. The current work item's culture and test-mode flag are propagated when one is available; otherwise the scope culture and non-test mode are used. Triggering starts the matching event handlers and returns their work-item IDs after the trigger operation completes.
If no listeners are triggered, an empty array is returned.