19 lines
671 B
C#
19 lines
671 B
C#
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<IGroupRepository, GroupRepositoryImpl>()
|
|
.AddSingleton<UserUseCase>();
|
|
|
|
var serviceProvider = services.BuildServiceProvider();
|
|
|
|
GroupRepositoryImpl groupRepositoryImpl = new GroupRepositoryImpl();
|
|
UserUseCase userUseCase = serviceProvider.GetService<UserUseCase>();
|
|
GroupUseCase groupUseCase = new GroupUseCase(groupRepositoryImpl);
|
|
|
|
MainMenuUI mainMenuUI = new MainMenuUI(userUseCase, groupUseCase); |