Skip to content

Update SW103 migration docs to use Aspire wrapper client registrations#5

Draft
cliedeman with Copilot wants to merge 2 commits into
mainfrom
copilot/update-sw103-documentation
Draft

Update SW103 migration docs to use Aspire wrapper client registrations#5
cliedeman with Copilot wants to merge 2 commits into
mainfrom
copilot/update-sw103-documentation

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor

SW103’s migration guidance now reflects Aspire-first client registration instead of direct Azure SDK constructors, while preserving the keyed-services migration model. The rule doc also now links directly to the relevant Aspire client docs for blobs, queues, and tables.

  • Registration guidance update

    • Replaced the “Registration — after (keyed services)” sample to use Aspire wrappers:
      • AddAzureBlobClient("blob-storage")
      • AddAzureQueueClient("order-queue")
      • AddAzureTableClient("order-table")
    • Kept the keyed-services story explicit by showing keyed resolution with FromKeyedServices.
  • Documentation links

    • Added/updated direct Aspire client documentation links for:
      • Azure Storage Blobs client
      • Azure Storage Queues client
      • Azure Data Tables client
  • Example (updated pattern)

builder.Services.AddAzureBlobClient("blob-storage");
builder.Services.AddAzureQueueClient("order-queue");
builder.Services.AddAzureTableClient("order-table");

public class QueueWorker(
    [FromKeyedServices("order-queue")] QueueServiceClient queueClient,
    [FromKeyedServices("order-table")] TableServiceClient tableClient)
{
}
Original prompt

Update docs/docs/rules/sw103-avoid-microsoft-extensions-azure.md in stackworx-dotnet/Stackworx.Analyzers.

Make the following documentation changes:

  • Update the Registration — after example so it uses Aspire wrappers instead of direct Azure SDK client construction.
  • Keep the example aligned with the rule guidance around keyed services.
  • Include links to the relevant Aspire client docs for:
    • Azure Storage Blobs client
    • Azure Storage Queues client
    • Azure Data Tables client
  • The user specifically requested the blobs docs URL:
    • https://aspire.dev/integrations/cloud/azure/azure-storage-blobs/azure-storage-blobs-client/
  • Add the corresponding queue and table documentation links in the same section and/or related documentation section as appropriate.
  • Ensure the markdown remains well-structured and readable.

Repository file to update:

  • docs/docs/rules/sw103-avoid-microsoft-extensions-azure.md

Source context from the current file:

  • It currently shows a Registration — after (keyed services) example using AddKeyedSingleton<BlobServiceClient> and AddKeyedSingleton<QueueServiceClient> with direct constructors.
  • Replace that example with one that uses Aspire wrapper registrations while preserving the keyed-services migration story.

Create a pull request with the documentation change.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: update the registration after(keyed services) to use aspire wrappers.

Include links to the docs

https://aspire.dev/integrations/cloud/azure/azure-storage-blobs/azure-storage-blobs-client/

same for table and queue

Assistant: I’m waiting for your confirmation on the pending repository update, and once you respond I can continue.

User: create a pull request

Assistant: I’m waiting for your confirmation on the pull request creation request, and once you approve it I’ll continue.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Update documentation for rule SW103 to use Aspire wrappers Update SW103 migration docs to use Aspire wrapper client registrations May 31, 2026
Copilot AI requested a review from cliedeman May 31, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants