Closed silkfire closed 5 years ago
Sounds like you are looking to call this in Startup.cs. One thing to note is that by default asp.net core registers hundreds of dependencies on it's own so this will be very large.
var description =
app.ApplicationServices.GetService<IExportLocatorScope>().WhatDoIHave();
Now that's a very clever trick. Thank you!
At the moment there doesn't seem to be a way to run
WhatDoIHave()
when running in an ASP.NET Core application.I know that the service provider is in
IApplicationBuilder.ApplicationService
, butGrace.DependencyInjection.Extensions.GraceRegistration.GraceServiceProvider
is a private class and itsIInjectionScope
is private too, so there's no way of running the extension method as of right now.How do I access the container?