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(); var serviceProvider = services.BuildServiceProvider(); GroupRepositoryImpl groupRepositoryImpl = new GroupRepositoryImpl(); UserUseCase userUseCase = serviceProvider.GetService(); GroupUseCase groupUseCase = new GroupUseCase(groupRepositoryImpl); MainMenuUI mainMenuUI = new MainMenuUI(userUseCase, groupUseCase);