/// <summary> /// Enables all available features. /// </summary> public static ModularServiceCollection WithAllFeatures( this ModularServiceCollection modules) { modules.Configure(services => { services.AddAllFeaturesDescriptor(); }); return(modules); }
public static ModularServiceCollection WithConfiguredTenantsAndFeatures(this ModularServiceCollection modules) { modules.Configure(services => { services.AddScoped <IShellSettingsManager, FileShellSettingsManager>(); services.AddScoped <IShellDescriptorManager, FileShellDescriptorManager>(); }); return(modules); }
public static ModularServiceCollection AddConfiguration( this ModularServiceCollection modules, IConfiguration configuration) { // Register the configuration object for modules to register options with it if (configuration != null) { modules.Configure(services => services.AddSingleton <IConfiguration>(configuration)); } return(modules); }
public static ModularServiceCollection WithDefaultFeatures( this ModularServiceCollection modules, params string[] featureIds) { modules.Configure(services => { foreach (var featureId in featureIds) { services.AddTransient(sp => new ShellFeature(featureId)); } ; }); return(modules); }