using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; namespace zero.Architecture; public abstract class ZeroModule : IZeroModule { /// public virtual int Order { get; } = 0; /// public virtual int ConfigureOrder => Order; /// public virtual void ConfigureServices(IServiceCollection services, IConfiguration configuration) { } /// public virtual void Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider) { } } public interface IZeroModule { /// /// Get the value to use to order startups to configure services. The default is 0. /// int Order { get; } /// /// Get the value to use to order startups to build the pipeline. The default is the 'Order' property. /// int ConfigureOrder { get; } /// /// This method gets called by the runtime. Use this method to add services to the container. /// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940 /// /// The collection of service descriptors. void ConfigureServices(IServiceCollection services, IConfiguration configuration); /// /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. /// /// /// /// void Configure(IApplicationBuilder builder, IEndpointRouteBuilder routes, IServiceProvider serviceProvider); }