private static AutofacServiceProvider ConfigureServices() { var serviceCollection = new ServiceCollection() .AddLogging(builder => { builder.AddConsole(); builder.AddDebug(); }). AddOptions(); var configuration = BuildConfiguration(); serviceCollection.Configure <LexDocuments>(configuration.GetSection("LexDocuments")); var serviceProvider = DependencyInjectionBuilder.Build(serviceCollection); return(serviceProvider); }
internal static List <OutputFile> ResolveSingleOutputFiles() { var outputFiles = new List <OutputFile>(); if (MainInfoManager.EntityInformation.ConnectionFactory != null) { outputFiles.AddRange(ConnectionFactoryBuilder.Build()); } if (MainInfoManager.EntityInformation.GenericRepository != null) { outputFiles.AddRange(GenericRepositoryBuilder.Build()); } if (MainInfoManager.EntityInformation.DependencyInjection?.Modules != null) { outputFiles.AddRange(MainInfoManager.EntityInformation.DependencyInjection.Modules.Select(x => DependencyInjectionBuilder.Build(x))); } return(outputFiles); }