PayloadSnapshot¶
Namespace:
SideXP.Broadcaster
An immutable, stringified picture of an event's payload, taken by the monitor at send time. It never holds a live reference to the payload: mutable class payloads can't lie after the fact, and no dead object is kept alive by the monitor.
Remarks
Field values are captured one level deep (a field that is itself a complex object is shown by its own ToString(), or just its type name), never expanded further. Strings, collections and long values are truncated to hard caps. Only produced in the editor and development builds; release builds never produce one.
Constructors¶
PayloadSnapshot(string, string, IReadOnlyList<PayloadField>)¶
An immutable, stringified picture of an event's payload, taken by the monitor at send time. It never holds a live reference to the payload: mutable class payloads can't lie after the fact, and no dead object is kept alive by the monitor.
Remarks
Field values are captured one level deep (a field that is itself a complex object is shown by its own ToString(), or just its type name), never expanded further. Strings, collections and long values are truncated to hard caps. Only produced in the editor and development builds; release builds never produce one.
Properties¶
TypeName¶
The name of the event type this snapshot is of.
Summary¶
A one-line summary from the event's own ToString() override, or null when the type doesn't override it (the default Object/ValueType implementations are never captured, they're just noise).
Fields¶
The captured public fields and properties, in reflected order. Empty when the payload has no public members, or when the event opted out of capture with [Event(OmitSnapshot = true)]. Never null.
Methods¶
ToString()¶
A compact one-line rendering of the snapshot, eg. HealthChanged { unit = "Hero (Unit)", value = 42 }. Uses Summary as the body when the type overrides ToString(), otherwise lists the captured fields.