Table of Contents

Namespace Xui.Core.Debug

Classes

Instruments

Factory for creating instrumentation sinks.

InstrumentsAccessorExtensions

Extension methods on InstrumentsAccessor for visual tree diagnostics.

Structs

InstrumentsAccessor

Lightweight zero-allocation facade over an IInstrumentsSink for logging and tracing. All formatting is skipped when the sink is disabled for the given scope and level.

InstrumentsInterpolatedStringHandler

Low-allocation interpolated string handler used by Log(Scope, LevelOfDetail, ref InstrumentsInterpolatedStringHandler) and Trace(Scope, LevelOfDetail, ref InstrumentsInterpolatedStringHandler). The compiler selects this handler automatically when the sink is disabled, skipping all formatting entirely.

TraceScope

A ref struct returned by Trace(Scope, LevelOfDetail, ref InstrumentsInterpolatedStringHandler) that closes the active trace scope when disposed. Intended for use with using.

Interfaces

IInstruments

Factory interface for creating instrumentation sinks. Register in the DI container at startup. Implementations are swappable (console, file, network, E2E test).

IInstrumentsSink

Per-run-loop instrumentation sink that receives fully-formatted messages. Thread-aligned — must not be shared across run loops or threads.

Enums

LevelOfDetail

Controls the verbosity threshold for instrumentation output.

Scope

Identifies the subsystem or category of an instrumentation event.