Table of Contents

Class Runtime

Namespace
Xui.Core.Actual
Assembly
Xui.Core.dll

Provides global access to the platform-specific runtime environment for the current Xui application.

The platform must assign Current at startup with a concrete IRuntime implementation, which wires up platform-specific services like rendering, window creation, and dispatching.

public static class Runtime
Inheritance
Runtime
Inherited Members

Properties

Current

Gets or sets the current platform runtime instance. This must be initialized at application startup by platform bootstrap code.

public static IRuntime Current { get; set; }

Property Value

IRuntime

Exceptions

Runtime.RuntimeNotAvailable

Thrown if accessed before the runtime has been initialized.

CurrentInstruments

Gets the thread-local instrumentation accessor. Lazily creates a sink from Instruments on first access per thread.

public static InstrumentsAccessor CurrentInstruments { get; }

Property Value

InstrumentsAccessor

DrawingContext

Gets the global drawing context provided by the current platform runtime, if available.

public static IContext? DrawingContext { get; }

Property Value

IContext

Instruments

Gets or sets the instrumentation factory for runtime diagnostics. Set at startup before calling Run().

public static IInstruments? Instruments { get; set; }

Property Value

IInstruments

MainDispatcher

Gets the main dispatcher for scheduling UI work on the platform's main thread, if available.

public static IDispatcher? MainDispatcher { get; }

Property Value

IDispatcher