﻿using Autofac;
using DatabaseModule;
using DatabaseModule.Entieties;
using NewsUpdaterModule;
using UserApplication;

namespace WPFAplication
{
    public static class ContainerBuilders
    {
        public static IContainer Container;

        public static IContainer BuildContainer()
        {
            var builder = new ContainerBuilder();
            builder.RegisterType<ChooseUser>().AsSelf();
            builder.RegisterType<MainWindow>().AsSelf();
            builder.RegisterType<DatabaseModel>().AsSelf();
            builder.RegisterType<NewsUpdater>().AsSelf();
            builder.RegisterType<DatabaseService>();
            Container = builder.Build();
            return Container;
        }
    }
}
