You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
959 B
50 lines
959 B
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<string, string> args)
|
|
{
|
|
await OnInitialize(args);
|
|
}
|
|
|
|
protected virtual async Task OnInitialize(Dictionary<string, string> args)
|
|
{
|
|
await Task.CompletedTask;
|
|
}
|
|
|
|
public async Task Start(Dictionary<string, string> args)
|
|
{
|
|
await OnStart(args);
|
|
}
|
|
|
|
protected virtual async Task OnStart(Dictionary<string, string> args)
|
|
{
|
|
await Task.CompletedTask;
|
|
}
|
|
}
|