Class EventListenerAttribute
Optional configuration for event listener handle methods.
[AttributeUsage(AttributeTargets.Method)]
public sealed class EventListenerAttribute : Attribute
- Inheritance
-
EventListenerAttribute
- Inherited Members
Properties
MustRunInstantly
Highest priority possible, ensures the event listener runs without switching contexts from the original event.
public bool MustRunInstantly { get; set; }
Property Value
Remarks
Not supported on IAsyncEventListener<TEventArgs>. An error will be thrown.
MustRunLast
Lowest priority possible, ensures the event listener runs after any events could have cancelled the event. If an event with this flag cancels the event an exception will be thrown.
public bool MustRunLast { get; set; }
Property Value
Priority
Positive values run before negative values. 0 is neutral.
public int Priority { get; set; }
Property Value
Remarks
Defaults to 0.
RequireActiveLayout
Requires that a session has started before invoking this event.
public bool RequireActiveLayout { get; set; }
Property Value
RequireNextFrame
Requires that this event listener wait until the next frame has completed (NextFrame(CancellationToken, bool)).
public bool RequireNextFrame { get; set; }
Property Value
RequiresMainThread
If this listener must be invoked on the main thread.
public bool RequiresMainThread { get; set; }
Property Value
Remarks
Defaults to true for IEventListener<TEventArgs>'s and false for IAsyncEventListener<TEventArgs>'s.