Class ServiceProvider
Inheritance
ServiceProvider
Assembly: Microsoft.Extensions.DependencyInjection.dll
Syntax
public sealed class ServiceProvider : IKeyedServiceProvider, IServiceProvider, IDisposable, IAsyncDisposable
Methods
Dispose()
Declaration
DisposeAsync()
Declaration
public ValueTask DisposeAsync()
Returns
GetKeyedService(Type, object?)
Declaration
public object? GetKeyedService(Type serviceType, object? serviceKey)
Parameters
Type |
Name |
Description |
Type |
serviceType |
|
object |
serviceKey |
|
Returns
GetRequiredKeyedService(Type, object?)
Declaration
public object GetRequiredKeyedService(Type serviceType, object? serviceKey)
Parameters
Type |
Name |
Description |
Type |
serviceType |
|
object |
serviceKey |
|
Returns
GetService(Type)
Declaration
public object? GetService(Type serviceType)
Parameters
Type |
Name |
Description |
Type |
serviceType |
|
Returns
Implements