Skip to content

Violation

Namespace: SideXP.Broadcaster

public struct Violation

The monitor's structured report of a bus misuse, handed to the OnViolation hook. Produced in the editor and development builds only; release builds never produce one.

Constructors

Violation(ViolationKind, Type, object, string, int, DispatchSpan)

public Violation(ViolationKind kind, Type eventType, object owner, string message, int frame, DispatchSpan span)

The monitor's structured report of a bus misuse, handed to the OnViolation hook. Produced in the editor and development builds only; release builds never produce one.

Properties

Kind

public ViolationKind Kind

What was misused.

EventType

public Type EventType

The event type involved.

Owner

public object Owner

For a registration-time violation (a duplicate handler or provider), the owner of the rejected registration; otherwise null.

Message

public string Message

A human-readable summary.

Frame

public int Frame

The frame the violation happened on.

Span

public DispatchSpan Span

For a dispatch-time violation (an unhandled order, an unanswered ask, a sync call on an async handler), the dispatch it happened in (when a dispatch-span hook is attached); otherwise null. Always null for registration-time violations.