Definition
Assembly: Microsoft.Extensions.DependencyInjection.Abstractions.dll Namespace: Microsoft.Extensions.DependencyInjectionSyntax
Summary
This type is defined in Microsoft.Extensions.DependencyInjection.Abstractions.Remarks
See Microsoft documentation for more information about the rest of the API.Methods
AddConfigurationBase Extension
Extension method from
Microsoft.Extensions.DependencyInjection.EasyAF_Configuration_IServiceCollectionExtensionsSyntax
Parameters
| Name | Type | Description |
|---|---|---|
services | Microsoft.Extensions.DependencyInjection.IServiceCollection | The service collection to add the configuration to. |
configuration | Microsoft.Extensions.Configuration.IConfiguration | The configuration instance to bind from. |
configSectionName | string | The name of the configuration section to bind from. |
Returns
Type:TConfiguration
The bound configuration instance for immediate use or further configuration.
Type Parameters
TConfiguration- The type of configuration class that inherits from ConfigurationBase.
Examples
AddHttpClients Extension
Extension method from
Microsoft.Extensions.DependencyInjection.EasyAF_Http_IServiceCollectionExtensionsSyntax
Parameters
| Name | Type | Description |
|---|---|---|
services | Microsoft.Extensions.DependencyInjection.IServiceCollection | The service collection to add HTTP clients to. |
config | TConfig | The configuration instance containing endpoint definitions. |
Returns
Type:Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection for method chaining.
Type Parameters
TConfig- The configuration type that contains HTTP endpoint definitions.TMessageHandler- The type of message handler to add to the HTTP clients.
AddHttpClients Extension
Extension method from
Microsoft.Extensions.DependencyInjection.EasyAF_Http_IServiceCollectionExtensionsSyntax
Parameters
| Name | Type | Description |
|---|---|---|
services | Microsoft.Extensions.DependencyInjection.IServiceCollection | The service collection to add HTTP clients to. |
config | TConfig | The configuration instance containing endpoint definitions. |
httpHandlerMode | CloudNimble.EasyAF.Core.HttpHandlerMode | Specifies how message handlers should be configured for the HTTP clients. |
Returns
Type:Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection for method chaining.
Type Parameters
TConfig- The configuration type that contains HTTP endpoint definitions.TMessageHandler- The type of message handler to add to the HTTP clients.