This commit is contained in:
Tig
2025-12-01 17:24:57 -07:00
parent f2a47367a5
commit 215d76645b
7 changed files with 61 additions and 36 deletions

View File

@@ -16,9 +16,6 @@ using Terminal.Gui.Views;
[assembly: ExampleDemoKeyStrokes (KeyStrokes = ["Enter", "Esc"], DelayMs = 100, Order = 4)]
[assembly: ExampleDemoKeyStrokes (KeyStrokes = ["Enter", "Esc"], DelayMs = 100, Order = 5)]
// Setup automatic key injection for testing
ExampleContextInjector.SetupAutomaticInjection ();
// Check for test context to determine driver
string? contextJson = Environment.GetEnvironmentVariable (ExampleContext.ENVIRONMENT_VARIABLE_NAME);
string? driverName = null;
@@ -30,6 +27,10 @@ if (!string.IsNullOrEmpty (contextJson))
}
IApplication app = Application.Create ();
// Setup automatic key injection for testing
ExampleContextInjector.SetupAutomaticInjection (app);
app.Init (driverName);
// Example 1: Use extension method with result extraction