#nullable enable namespace Terminal.Gui.Drivers; /// /// Implements a fake application lifecycle for testing purposes. Cleans up the application on dispose by cancelling /// the provided and shutting down the application. /// /// internal class FakeApplicationLifecycle (CancellationTokenSource hardStop) : IDisposable { /// public void Dispose () { hardStop.Cancel (); Application.TopRunnable?.Dispose (); Application.Shutdown (); } }