using Posechaemost.Data.Repository; using Posechaemost.Domain.UseCase; using Posechaemost.UI; using Microsoft.Extensions.DependencyInjection; using System.Text.RegularExpressions; IServiceCollection services = new ServiceCollection(); services .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton(); var serviceProvider = services.BuildServiceProvider(); var userUseCase = serviceProvider.GetService(); var groupUseCase = serviceProvider.GetService(); var presenceUseCase = serviceProvider.GetService(); MainMenuUI mainMenuUI = new MainMenuUI(userUseCase, groupUseCase, presenceUseCase);