1.24.10
Fixed
- When the
TestContext
was disposed, it disposed of all services via the service provider. However, if there were ongoing renders happening, this could cause inconsistent state in the render tree, since theTestRenderer
could try to access the service provider to instantiate components.
This release changes the dispose phase such that the renderer gets disposed first, then the service provider. The disposal of any services that implementIAsyncDisposable
is now also awaited. Fixed by @egil and @linkdotnet. Reported by @BenSchoen in #1227.
Added
-
Support for custom service provider factories (
IServiceProviderFactory<TContainerBuilder>
). This enables the use of Autofac and other frameworks for dependency injection like on real-world ASP.NET Core / Blazor projects. By @inf9144. -
Ability to raise the
oncancel
andonclose
event, that was introduced with .NET 8.