I am trying to better understand how one understands the requirements of a delegate function parameter to a function. In other words, how does one know which operations need to be performed in the delegate?
For example, HostBuilder.ConfigureAppConfiguration method takes as input a configureDelegate.
How do we know what to do within the expression provided as input such as below:
var builder = WebApplication.CreateBuilder(args);
builder.Host.ConfigureAppConfiguration((hostingContext, config) =>
{
config.AddJsonFile("MySubsection.json",
optional: true,
reloadOnChange: true);
});
builder.Services.AddRazorPages();
var app = builder.Build();