Table of Contents

Class EventListenerAttribute

Namespace
Uncreated.Warfare.Events
Assembly
Uncreated.Warfare.dll

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

bool

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

bool

Priority

Positive values run before negative values. 0 is neutral.

public int Priority { get; set; }

Property Value

int

Remarks

Defaults to 0.

RequireActiveLayout

Requires that a session has started before invoking this event.

public bool RequireActiveLayout { get; set; }

Property Value

bool

RequireNextFrame

Requires that this event listener wait until the next frame has completed (NextFrame(CancellationToken, bool)).

public bool RequireNextFrame { get; set; }

Property Value

bool

RequiresMainThread

If this listener must be invoked on the main thread.

public bool RequiresMainThread { get; set; }

Property Value

bool

Remarks