mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* touching publish.yml * Moved Examples into ./Examples * Moved Benchmarks into ./Tests * Moved Benchmarks into ./Tests * Moved UICatalog into ./Examples * Moved UICatalog into ./Examples 2 * Moved tests into ./Tests * Updated nuget
26 lines
736 B
C#
26 lines
736 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Terminal.Gui;
|
|
|
|
namespace CommunityToolkitExample;
|
|
|
|
public static class Program
|
|
{
|
|
public static IServiceProvider? Services { get; private set; }
|
|
|
|
private static void Main (string [] args)
|
|
{
|
|
Services = ConfigureServices ();
|
|
Application.Init ();
|
|
Application.Run (Services.GetRequiredService<LoginView> ());
|
|
Application.Top?.Dispose();
|
|
Application.Shutdown ();
|
|
}
|
|
|
|
private static IServiceProvider ConfigureServices ()
|
|
{
|
|
var services = new ServiceCollection ();
|
|
services.AddTransient<LoginView> ();
|
|
services.AddTransient<LoginViewModel> ();
|
|
return services.BuildServiceProvider ();
|
|
}
|
|
} |