fix(is): Only summarize usage in dev

This commit is contained in:
Joe DeCock 2025-01-07 14:23:59 -06:00
parent 0c6eb67f3b
commit 0d95d547bd

View file

@ -38,12 +38,17 @@ try
.ConfigureServices()
.ConfigurePipeline();
app.Lifetime.ApplicationStopping.Register(() =>
if (app.Environment.IsDevelopment())
{
var usage = app.Services.GetRequiredService<LicenseUsageSummary>();
Console.Write(Summary(usage));
Console.ReadKey();
});
app.Lifetime.ApplicationStopping.Register(() =>
{
var usage = app.Services.GetRequiredService<LicenseUsageSummary>();
Console.Write(Summary(usage));
{
Console.ReadKey();
}
});
}
app.Run();
}