public static IServiceCollection ConfigureServices(IGenerationStartup source, IServiceCollection collection)
        {
            var featureProvider = new GeneratorFeaturesProvider(collection);

            source.ConfigureFeatures(featureProvider);
            return(featureProvider._services);
        }
예제 #2
0
 public IServiceProvider GetStartupScopeService(IGenerationStartup startup)
 {
     if (scopes.TryGetValue(startup, out var scope))
     {
         return(scope.ServiceProvider);
     }
     scope = _provider.StartupServices[startup].CreateScope();
     scope.ServiceProvider.GetRequiredService <SourceScopeService>().CurrentScopeService = _scopedService;
     scopes.Add(startup, scope);
     return(scope.ServiceProvider);
 }
 public static IServiceCollection AddFeatureProvider(this IServiceCollection collection, IGenerationStartup startup)
 => GeneratorFeaturesProvider.ConfigureServices(startup, collection);
 public void Deconstruct(out SchemaLayout layout, out IGenerationStartup startup, out SchemaInfo config)
 {
     layout  = Layout;
     startup = Startup;
     config  = SchemaInfo;
 }
 public TypeLayoutInfo(SchemaLayout layout, IGenerationStartup startup, SchemaInfo schemaInfo)
 {
     Layout     = layout;
     Startup    = startup;
     SchemaInfo = schemaInfo;
 }