using Connected.Annotations; using Connected.ServiceModel; using Connected.ServiceModel.Transactions; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; [assembly: MicroService(MicroServiceType.Sys)] namespace Connected; internal sealed class RuntimeStartup : Startup { public static WebApplication? Application { get; private set; } protected override void OnConfigure(WebApplication app) { Application = app; } protected override void OnConfigureServices(IServiceCollection services) { services.AddSingleton(typeof(IContextProvider), typeof(ContextProvider)); services.AddScoped(typeof(IContext), typeof(Context)); services.AddScoped(typeof(ITransactionContext), typeof(TransactionContext)); services.AddScoped(typeof(ICancellationContext), typeof(CancellationContext)); } }