Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface Microsoft.​Extensions.​DependencyInjection.​ISupportRequiredService
Assembly: Microsoft.Extensions.DependencyInjection.Abstractions
Optional contract used by <see cref="M:Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService``1(System.IServiceProvider)" /> to resolve services if supported by <see cref="T:System.IServiceProvider" /> .
Methods
object
GetRequiredService​(System.​Type serviceType)
Gets service of type <paramref name="serviceType" /> from the <see cref="T:System.IServiceProvider" /> implementing
this interface.
Returns A service object of type <paramref name="serviceType" /> .
Throws an exception if the <see cref="T:System.IServiceProvider" /> cannot create the object.
serviceType
An object that specifies the type of service object to get.