Enum ScyllaEventPriority
Defines the execution priority levels for event handlers registered with the Scylla Event eXchange System (SEX).
Namespace: Scylla.Core.Events
Assembly: ScyllaCore.dll
Syntax
public enum ScyllaEventPriority
Remarks
Handlers with a numerically lower priority value are invoked before handlers with a numerically higher value. When two handlers share the same priority level, they are invoked in the order they were subscribed (stable sort by subscription ID).
The dispatch chain respects event cancellation: if a handler calls StopPropagation() on the event, all subsequent handlers whose priority is neither Essential nor Cleanup are skipped. Handlers at those two special priority levels are always invoked regardless of cancellation state.
Dispatch order summary (lowest to highest numeric value):
Fields
| Name | Description |
|---|---|
| Cleanup | The handler always runs last in the dispatch chain and is never skipped, even if the event was cancelled via StopPropagation(). |
| Essential | The handler runs first in the dispatch chain and is never skipped, even if a previous handler has cancelled the event via StopPropagation(). |
| High | The handler runs early in the dispatch chain, after all Essential handlers but before Medium and Low handlers. |
| Low | The handler runs late in the dispatch chain, after all Essential, High, and Medium handlers. |
| Medium | The handler runs in the middle of the dispatch chain. This is the default priority assigned when no explicit priority is provided to Listen<TEvent>(object, Action<TEvent>, ScyllaEventPriority). |