Example #1
0
        public IContainer Build()
        {
            var configuration = new ConfigurationBuilder()
                                .SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
                                .AddJsonFile("appsettings.json")
                                .Build();

            SerilogConfig.Configuration();

            var builder = new ContainerBuilder();

            builder.RegisterInstance(configuration).As <IConfiguration>();
            builder.RegisterModule <AutoMapperModule>();
            builder.RegisterModule <DataContextsModule>();
            builder.RegisterModule <HelpersModule>();
            builder.RegisterModule <MediatorModule>();
            builder.RegisterModule <OptionsModule>();
            builder.RegisterModule <ValidatorsModule>();
            builder.RegisterModule <PipelineModuleIEgov>();
            builder.RegisterModule <PipelineModuleContract>();
            builder.RegisterModule <PipelineModuleSituationCenter>();
            builder.RegisterModule <ServicesModule>();

            return(builder.Build());
        }
Example #2
0
 private static void SetConfiguration()
 {
     SerilogConfig.Configuration();
 }