Skip to content

Commit

Permalink
Avoid public API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkatz6 committed Jan 18, 2024
1 parent 83dae67 commit 38c9e96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void Setup(string[] args)
lifetimeEvents.ShutdownRequested += OnShutdownRequested;
}

public int StartMainLoop()
public int Start()
{
_cts = new CancellationTokenSource();

Expand Down Expand Up @@ -243,7 +243,7 @@ public static int StartWithClassicDesktopLifetime(
{
var lifetime = PrepareLifetime(args, lifetimeBuilder);
builder.SetupWithLifetime(lifetime);
return lifetime.StartMainLoop();
return lifetime.Start();
}

/// <summary>
Expand All @@ -258,7 +258,7 @@ public static int StartWithClassicDesktopLifetime(
{
var lifetime = PrepareLifetime(args, l => l.ShutdownMode = shutdownMode);
builder.SetupWithLifetime(lifetime);
return lifetime.StartMainLoop();
return lifetime.Start();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void Should_Set_ExitCode_After_Shutdown()
using(var lifetime = new ClassicDesktopStyleApplicationLifetime())
{
Dispatcher.UIThread.Post(() => lifetime.Shutdown(1337));
var exitCode = lifetime.StartMainLoop(Array.Empty<string>());
var exitCode = lifetime.Start(Array.Empty<string>());

Assert.Equal(1337, exitCode);
}
Expand Down Expand Up @@ -234,7 +234,7 @@ public void Should_Allow_Canceling_Shutdown_Via_ShutdownRequested_Event()

// Force exit immediately
Dispatcher.UIThread.Post(Dispatcher.UIThread.ExitAllFrames);
lifetime.StartMainLoop(Array.Empty<string>());
lifetime.Start(Array.Empty<string>());

var window = new Window();
var raised = 0;
Expand Down

0 comments on commit 38c9e96

Please sign in to comment.