Vixen
dd8b0a81
csharp
public sealed class AppBuilder

Assembles an application, one decision at a time.

Read the guide page for this →

Remarks

⚠ A builder with no backends refuses rather than guesses. Choosing between Vulkan and Null, or between the desktop platform and the headless one, means referencing those assemblies — and they are in Platform/, which this one may not reference. So the two choices arrive as IPlatformFactory and IGraphicsBackend, and VixenApp.Create in the Vixen.App package is what installs the defaults. A caller assembling a builder by hand supplies them, or supplies a platform and a device outright with WithPlatform and WithGraphics.

Methods (10)

  • public AppBuilder(AppArguments arguments)

    Starts configuring an application from parsed arguments.

  • public AppBuilder WithPlatform(IPlatform host)

    Uses a platform the caller built, rather than detecting one.

  • public AppBuilder WithGraphics(IGraphicsDevice graphics)

    Uses a device the caller built, rather than choosing one.

  • public AppBuilder WithPlatformFactory(IPlatformFactory factory)

    Uses a factory to pick the platform, when none was handed in.

  • public AppBuilder WithGraphicsBackend(IGraphicsBackend graphics)

    Uses a backend to open the device, when none was handed in.

  • public AppBuilder WithContent(IContentTransport content)

    Uses a transport for remote content, rather than plain HTTP.

  • public AppBuilder WithLoggerProvider(ILoggerProvider provider)

    Adds a log sink before the host has any logger of its own.

  • public AppBuilder WithLoggerProvider(Func<LogFilter, ILoggerProvider> create)

    Adds a log sink built over the host's own filter, before the host logs anything.

  • public AppBuilder WithServices(Action<AppServices> configure)

    Registers extra services once everything else exists.

  • public VixenApplication Build(Game game)

    Builds the application.

Used by (18)

  • AppBackendTestsVixen.App.Tests
  • DefaultWorkerCountTestsVixen.App.Tests
  • DeviceLossTestsVixen.App.Tests
  • FrameCaptureTestsVixen.App.Tests
  • HeadlessFlagTestsVixen.App.Tests
  • HostLoggerFactoryTestsVixen.App.Tests
  • HostedEngineTestsVixen.App.Tests
  • HostedOverlayTestsVixen.App.Tests
  • HostedRendererTestsVixen.App.Tests
  • LogConfigFileTestsVixen.App.Tests
  • RemoteContentMountTestsVixen.App.Tests
  • StartupSceneTestsVixen.App.Tests
  • TestAppVixen.App.Tests
  • TraceExportTestsVixen.App.Tests
  • VixenAppVixen.App
  • VixenApplicationTestsVixen.App.Tests
  • WorkerPinningWiringTestsVixen.App.Tests
  • RealmAppVixen.Live.Realm