Grace icon indicating copy to clipboard operation
Grace copied to clipboard

Implementation with microsoft.extensions.dependencyinjection/Hosting

Open XanNava opened this issue 2 years ago • 4 comments

Hi I saw there is an implementation for asp.net, but was wondering if it could be implemented with just microsoft.extensions.dependencyinjection/Hosting? Aka for non web based .net core applications.

XanNava avatar Oct 04 '22 08:10 XanNava

I could be wrong but I believe this is the extension you're looking for

https://github.com/ipjohnson/Grace.DependencyInjection.Extensions/blob/master/src/Grace.Extensions.Hosting/GraceServiceProviderExtensions.cs#L20

ipjohnson avatar Oct 04 '22 10:10 ipjohnson

That looks like it, but seems to have dependancies tied around asp.net. I add that script which uses GraceServiceProviderFactory, then that needs GraceRegistration.Populate which is as far as I can get as that has a lot of dependancies that seem to be asp.net related. Currently trying to figure out how Populate works, but seems a bit out of my knowledge range as of yet.

XanNava avatar Oct 04 '22 23:10 XanNava

I'm interested in what dependencies you're seeing from asp.net when you use Grace.Extensions.Hosting as that's supposed to be the non asp.net version of the extension.

ipjohnson avatar Oct 04 '22 23:10 ipjohnson

Ah I was doing it wrong, I just loaded that package through nugget and it worked perfectly, thank!

XanNava avatar Oct 05 '22 02:10 XanNava