mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Rename IApplication.Current to TopRunnable
Co-authored-by: tig <585482+tig@users.noreply.github.com>
This commit is contained in:
@@ -71,8 +71,8 @@ public class ApplicationStressTests
|
||||
{
|
||||
int tbNow = _tbCounter;
|
||||
|
||||
// Wait for Application.Current to be running to ensure timed events can be processed
|
||||
while (Application.Current is null || Application.Current is { Running: false })
|
||||
// Wait for Application.TopRunnable to be running to ensure timed events can be processed
|
||||
while (Application.TopRunnable is null || Application.TopRunnable is { Running: false })
|
||||
{
|
||||
Thread.Sleep (1);
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public class ScenariosStressTests
|
||||
|
||||
void OnApplicationSessionBegun (object? sender, SessionTokenEventArgs e)
|
||||
{
|
||||
// Get a list of all subviews under Application.Current (and their subviews, etc.)
|
||||
// Get a list of all subviews under Application.TopRunnable (and their subviews, etc.)
|
||||
// and subscribe to their DrawComplete event
|
||||
void SubscribeAllSubViews (View view)
|
||||
{
|
||||
@@ -140,7 +140,7 @@ public class ScenariosStressTests
|
||||
}
|
||||
}
|
||||
|
||||
SubscribeAllSubViews (Application.Current!);
|
||||
SubscribeAllSubViews (Application.TopRunnable!);
|
||||
}
|
||||
|
||||
// If the scenario doesn't close within the abort time, this will force it to quit
|
||||
|
||||
Reference in New Issue
Block a user