I am working on .NET Core.
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
The CreateHostBuilder method returns IHostBuilder interface and is calling the Build method of that. So is it possible to implement code inside that interface or is it any design pattern?
CreateHostBuilder method return type which implement interface IHostBuilder and Build method on that returned type is getting called.