Vixen
02b45cc4
csharp
public sealed class AppServices

What the host built, named rather than looked up.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The handful of genuinely global things, as properties, so the common case is a field access rather than a dictionary lookup and a cast. Registry is the same set behind ServiceRegistry for anything that wants them generically — an editor panel, a plugin — and for the subsystems that arrive in later phases.

Not a DI container, for the reasons ServiceRegistry gives: no constructor injection, no lifetimes, no reflection, because under NativeAOT the alternative does not work and on a frame budget it costs more than it is worth.

Fields and properties (16)

  • public IPlatform Platform

    The operating system.

  • public IWindow? Window

    The window the host opened, or if the application wanted none.

  • public JobScheduler Jobs

    The job system.

  • public MainThreadDispatcher MainThread

    The queue for work that has to run on the thread that owns the platform.

  • public VirtualFileSystem FileSystem

    The virtual file system, with the platform's standard locations already mounted.

  • public RingBufferSink Logs

    The always-on log ring the console and the crash reporter read.

  • public ILoggerFactory LoggerFactory

    Where a subsystem gets its logger.

  • public AppConfig Config

    What the application was configured as.

  • public ContentMount Content

    The content build this application reads from, and where it came from.

  • public AssetManager? Assets

    Everything the application can load by address, or if it shipped with no content.

  • public EngineLoop? Engine

    The world, its systems, its behaviours and its fixed-step accumulator, or if UseEngine is off.

  • public SceneManager? Scenes

    The scenes loaded into Engine's world, or if UseEngine is off.

  • public InputService Input

    The devices, and every action asset being read from them.

  • public AppGraphics? Graphics

    The device, the swapchain and the frame the world is drawn through, or if Enabled is off.

  • public ServiceRegistry Registry

    The same set, for code that resolves generically.

  • public BuildVariant Variant

    Which build this is.

Used by (22)

  • ArenaThirdPersonShooter
  • GameSoundsThirdPersonShooter
  • PbrShowcaseGamePbrShowcase
  • PlayerRigThirdPersonShooter
  • ThirdPersonShooterGameThirdPersonShooter
  • TriangleGameHelloTriangle
  • VideoGameVideoPlayback
  • VirtualGeometryGameVirtualGeometry
  • AppBuilderVixen.App.Hosting
  • GameVixen.App.Hosting
  • VixenApplicationVixen.App.Hosting
  • AppBackendTestsVixen.App.Tests
  • HostedEngineTestsVixen.App.Tests
  • HostedRendererTestsVixen.App.Tests
  • OrderingGameVixen.App.Tests
  • PostingGameVixen.App.Tests
  • RecordingGameVixen.App.Tests
  • RemoteContentMountTestsVixen.App.Tests
  • StartupSceneTestsVixen.App.Tests
  • StoppingGameVixen.App.Tests
  • VixenApplicationTestsVixen.App.Tests
  • RealmVixen.Live.Realm