ipjohnson / Grace.DependencyInjection.Extensions

Grace Extensions for ASP.Net Core
19 stars 7 forks source link

Consider exposing IServiceProviderFactory implementation so Grace can be used with Blazor WASM and MAUI #32

Closed eerhardt closed 2 years ago

eerhardt commented 2 years ago

Today Grace has extension methods directly on IHostBuilder and IWebHostBuilder to enable the Grace DI container to be used in those app models. However this doesn't work for Blazor WASM and MAUI apps because they don't implement the IHostBuilder interface.

See the discussion https://github.com/dotnet/maui/pull/4505#discussion_r799685120.

We should consider exposing Grace's IServiceProviderFactory class so users can use Grace with these application models.

https://github.com/ipjohnson/Grace.DependencyInjection.Extensions/blob/425c2748f048c5eea1676df65040782b78f30dc2/src/Grace.AspNetCore.Hosting/GraceServiceProviderExtensions.cs#L42

ipjohnson commented 2 years ago

I've pushed a new version to nuget with a public implementation.