Esempio n. 1
0
        /// <summary>
        /// Enables all available features.
        /// </summary>
        public static ModularServiceCollection WithAllFeatures(
            this ModularServiceCollection modules)
        {
            modules.Configure(services =>
            {
                services.AddAllFeaturesDescriptor();
            });

            return(modules);
        }
Esempio n. 2
0
        public static ModularServiceCollection WithConfiguredTenantsAndFeatures(this ModularServiceCollection modules)
        {
            modules.Configure(services =>
            {
                services.AddScoped <IShellSettingsManager, FileShellSettingsManager>();
                services.AddScoped <IShellDescriptorManager, FileShellDescriptorManager>();
            });

            return(modules);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }