Vixen
02b45cc4
csharp
public interface ILifecycle

The process's lifecycle, and the platform's ability to interrupt it.

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

Remarks

Transitions are reported as ordinary events — Suspending, Resumed, LowMemory, Quit — so they arrive in the same stream and the same order as everything else. This interface is the state that stream describes, plus the two things a frame loop needs to *do* rather than observe.

On the desktop most of this never fires, which is precisely why it must be implemented and tested from the start: docs/plan/10 § Android puts lifecycle at the top of the list of bug sources, and a suspend path first exercised in Phase 3 on a physical device is a suspend path that has never worked.

Fields and properties (3)

  • ApplicationState State

    Where the application is now.

  • MemoryPressure MemoryPressure

    How much memory pressure the OS last reported.

  • bool IsQuitRequested

    Whether a quit has been requested and not yet cancelled.

Methods (2)

  • void RequestQuit()

    Asks the application to quit.

  • void CancelQuit()

    Withdraws a quit request.

Used by (13)

  • DesktopLifecycleVixen.Platform.Desktop
  • DesktopPlatformVixen.Platform.Desktop
  • DesktopPlatformTestsVixen.Platform.Desktop.Tests
  • HeadlessLifecycleVixen.Platform.Headless
  • HeadlessLifecycleTestsVixen.Platform.Headless.Tests
  • HeadlessPlatformVixen.Platform.Headless
  • HeadlessPlatformTestsVixen.Platform.Headless.Tests
  • IPlatformVixen.Platform
  • MobileLifecycleVixen.Platform
  • VixenApplicationVixen.App.Hosting
  • EditorHostVixen.Editor.Host
  • StoppingGameVixen.App.Tests
  • VixenApplicationTestsVixen.App.Tests