Integrates dotnet hot reload events into service collections.
<ItemGroup>
<PackageReference Update="RhoMicro.HotterReload" Version="1.0.0" />
</ItemGroup>Add hot reload services to a service collection:
var hotReloadBuilder = services.AddHotReload();On the returned builder, use the various overloads of AddHandler to register handlers for hot reload events:
In order to initialize the hot reload integration, resolve the IHotReloadServiceInitializer and invoke its Initialize method:
serviceProvider.GetRequiredService<IHotReloadServiceInitializer>().Initialize();When added to a service collection on a host builder such as the WebApplicationBuilder, this step is not necessary.