.NET 6 startup class - Dynamically update extension methods parameters without restart

61 views Asked by At

Lets say I have a startup.cs class with the following extension method (.AddXYZ) from an internal team.

builder.Services.AddXYZ(builder.Configuration, o =>
{
    o.Policy.Add(new InboundPolicyOptions()
    {
        ValidApplicationIds = builder.Configuration["AllowedAppIds"].Split(',').ToList(),
    });
 });

How can I update the above ValidApplicationIds list without having to restart the server.

I have tried using Azure App Configuration to store the list of ClientIds and tried testing dynamic refresh, but it did not help.

Please suggest.

0

There are 0 answers