Skip to content

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented Sep 30, 2025

Closes #6509.
Detailed info there, as it's the API proposal.

Microsoft Reviewers: Open in CodeFlow

@github-actions github-actions bot added the area-ai Microsoft.Extensions.AI libraries label Sep 30, 2025
@eduherminio eduherminio added area-hosting and removed area-ai Microsoft.Extensions.AI libraries labels Sep 30, 2025
@eduherminio eduherminio changed the title Add support for HostApplicationBuilder in AmbientMetadata extension Add support for HostApplicationBuilder in AmbientMetadata extension Sep 30, 2025
@eduherminio eduherminio marked this pull request as ready for review September 30, 2025 14:58
@eduherminio eduherminio requested a review from a team as a code owner September 30, 2025 14:58
@Copilot Copilot AI review requested due to automatic review settings September 30, 2025 14:58
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for HostApplicationBuilder alongside the existing IHostBuilder support in the AmbientMetadata extension library. This enhancement allows users to configure application metadata using the newer IHostApplicationBuilder interface.

  • Introduces a new generic UseApplicationMetadata<TBuilder> extension method constrained to IHostApplicationBuilder
  • Updates the API baseline manifest to reflect the new method signature
  • Adds comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ApplicationMetadataHostBuilderExtensions.cs Adds new generic extension method for IHostApplicationBuilder support
Microsoft.Extensions.AmbientMetadata.Application.json Updates API baseline manifest with new method and version bump
README.md Documents the new generic extension method signature
ApplicationMetadataExtensionsTests.cs Adds null argument validation tests for the new extension method
AcceptanceTests.cs Adds integration tests verifying the new extension method works correctly

@eduherminio eduherminio merged commit e8657b7 into dotnet:main Oct 1, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal]: Add support for HostApplicationBuilder in AmbientMetadata extension
2 participants