34 lines
1.3 KiB
C#
34 lines
1.3 KiB
C#
using ProjectGSM.Forms;
|
|
using ProjectGSM.Repositories;
|
|
using ProjectGSM.Repositories.Implementations;
|
|
using Unity;
|
|
using Unity.Lifetime;
|
|
|
|
namespace ProjectGSM
|
|
{
|
|
internal static class Program
|
|
{
|
|
/// <summary>
|
|
/// The main entry point for the application.
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
// To customize application configuration such as set high DPI settings or default font,
|
|
// see https://aka.ms/applicationconfiguration.
|
|
ApplicationConfiguration.Initialize();
|
|
Application.Run((CreateContainer().Resolve<FormAdvocateApp>()));
|
|
}
|
|
|
|
private static IUnityContainer CreateContainer()
|
|
{
|
|
var container = new UnityContainer();
|
|
container.RegisterType<ICaseAdvocateRepository, CaseAdvocateRepository>(new TransientLifetimeManager());
|
|
container.RegisterType<ICaseRepository, CaseRepository>(new TransientLifetimeManager());
|
|
container.RegisterType<IClientRepository, ClientRepository>(new TransientLifetimeManager());
|
|
container.RegisterType<ICourtRepository, CourtRepository>(new TransientLifetimeManager());
|
|
container.RegisterType<IStatusHistoryRepository, StatusHistoryRepository>(new TransientLifetimeManager());
|
|
return container;
|
|
}
|
|
}
|
|
} |