using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace Connected; public abstract class Startup : IStartup { protected IServiceProvider? Services { get; private set; } public void Configure(WebApplication app) { Services = app.Services; OnConfigure(app); } protected virtual void OnConfigure(WebApplication app) { } public void ConfigureServices(IServiceCollection services) { OnConfigureServices(services); } protected virtual void OnConfigureServices(IServiceCollection services) { } public async Task Initialize(Dictionary args) { await OnInitialize(args); } protected virtual async Task OnInitialize(Dictionary args) { await Task.CompletedTask; } public async Task Start(Dictionary args) { await OnStart(args); } protected virtual async Task OnStart(Dictionary args) { await Task.CompletedTask; } }