mirror of
https://github.com/DuendeSoftware/products
synced 2026-05-24 09:28:24 +00:00
Merge pull request #1709 from DuendeSoftware/jmdc/license-summary-resolution
fix(is): LicenseUsageSummary resolution
This commit is contained in:
commit
f6b1590bf1
1 changed files with 12 additions and 6 deletions
|
|
@ -38,12 +38,19 @@ try
|
|||
.ConfigureServices()
|
||||
.ConfigurePipeline();
|
||||
|
||||
var usage = app.Services.GetRequiredService<LicenseUsageSummary>();
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.Lifetime.ApplicationStopping.Register(() =>
|
||||
{
|
||||
var usage = app.Services.GetRequiredService<LicenseUsageSummary>();
|
||||
Console.Write(Summary(usage));
|
||||
{
|
||||
Console.ReadKey();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
app.Run();
|
||||
|
||||
Console.Write(Summary(usage));
|
||||
Console.ReadKey();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -55,7 +62,7 @@ finally
|
|||
Log.CloseAndFlush();
|
||||
}
|
||||
|
||||
string Summary(LicenseUsageSummary usage)
|
||||
static string Summary(LicenseUsageSummary usage)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine("IdentityServer Usage Summary:");
|
||||
|
|
@ -67,4 +74,3 @@ string Summary(LicenseUsageSummary usage)
|
|||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
Loading…
Reference in a new issue