using Microsoft.Extensions.DependencyInjection; using System; using zero.Core; using zero.Web.Sections; namespace zero.Web { public static class ZeroServiceCollectionExtensions { public static ZeroBuilder AddZero(this IServiceCollection services) { services.AddOptions() .Configure(opts => { opts.Sections.Add(); opts.Sections.Add(); opts.Sections.Add(); opts.Sections.Add(); opts.Sections.Add(); }); return new ZeroBuilder(services); } public static ZeroBuilder AddZero(this IServiceCollection services, Action setupAction) { ZeroBuilder builder = services.AddZero(); builder.Services.PostConfigure(setupAction); return builder; } } }