NamespaceSystemLibrary.Common.Net
Services is a global way to reuse the configured service provider and collection
Services
public static class Services
Inheritance
System.Object
Services
Services is a global way to reuse the configured service provider and collection
Add a scoped service to the service collection
Name | Description |
---|---|
T | |
TImpementation |
Add a service as singleton to the service collection
Name | Description |
---|---|
T | |
TImpementation |
Returns a new service collection
Only a default JsonSerializerOpions has been registered
Type | Description |
---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection |
Pass a reference to the Service Collection which will be used to add or remove services from
A default JsonSerializerOpions will be added
Type | Name | Description |
---|---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection | serviceCollection |
Type | Description |
---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection |
Pass a reference to the Service Provider which will be used to loook up services from
Type | Name | Description |
---|---|---|
System.IServiceProvider | serviceProvider |
Type | Description |
---|---|
System.IServiceProvider |
Get service as T or default if not found
Name | Description |
---|---|
T |
Type | Description |
---|---|
T |
Remove a service from the service collection
Name | Description |
---|---|
T |
}