using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using zero.Web.Sections; using zero.Web.ViewHelpers; namespace zero.Web.Defaults { internal class ZeroBackofficePlugin : ZeroPlugin { public override void Configure(IZeroOptions zero) { zero.Sections.Add(); zero.Sections.Add(); zero.Sections.Add(); zero.Sections.Add(); zero.Sections.Add(); zero.Settings.AddGroup(); zero.Settings.AddGroup(); zero.Permissions.AddCollection(); zero.Permissions.AddCollection(); zero.Permissions.AddCollection(); zero.Permissions.AddCollection(); zero.Pages.Add(Constants.Pages.FolderAlias, "@page.folder.name", "@page.folder.description", "fth-folder"); } public override void ConfigureServices(IServiceCollection services, IConfiguration configuration) { //services.AddAll(typeof(IValidator<>), ServiceLifetime.Scoped); //services.AddAll(typeof(IValidator), ServiceLifetime.Scoped); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddScoped(); services.AddTransient(); services.AddTransient(); services.AddScoped(); services.AddScoped(typeof(ICollectionContext<>), typeof(CollectionContext<>)); services.AddScoped(typeof(IInterceptorRunner<>), typeof(InterceptorRunner<>)); services.AddScoped(); } } }