Skip to content

[FEATURE REQ] AddClient support using the configuration to create a client instance #47160

@scrocquesel-ml150

Description

@scrocquesel-ml150

Library name

Microsoft.Extensions.Azure

Please describe the feature.

I want to be able to register client using a configuration object to create a client instance.

The Azure.IoT.DeviceUpdate do not have support for dependency injection with a dedicated extension method (see #43099). Meanwhile, I would like to register it myself with configuration object.

serviceCollection.AddAzureClients(clientBuilder =>
        {
            clientBuilder.AddClient<DeviceUpdateClient, DeviceUpdateClientOptions>(configuration.GetSection("DUConnection"));
        });

Should do the same thing as other client extension, for example

    clientBuilder.AddEventHubProducerClient(configuration.GetSection("EventHubConnection"));

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue is related to a non-management packageExtensionsASP.NET Core extensionscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-requestThis issue requires a new behavior in the product in order be resolved.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions