Add EndpointProperty.HostAndPort#7629
Merged
mitchdenny merged 6 commits intodotnet:mainfrom Feb 19, 2025
Merged
Conversation
afscrome
commented
Feb 15, 2025
- Add `EndpointProperty.HostAndPort` - Update existing places that can now use `HostAndPort` instead of concatenating Host and Port themselves.
86a4471 to
6e217f4
Compare
davidfowl
reviewed
Feb 17, 2025
davidfowl
reviewed
Feb 17, 2025
davidfowl
reviewed
Feb 17, 2025
Member
|
The change is good. I don't see that any tests needed updating so that's a good sign. I think you should look to add an explicit one though. |
davidfowl
reviewed
Feb 18, 2025
|
|
||
| Expressions = new() | ||
| { | ||
| { "TwoFullEndpoints", ReferenceExpression.Create($"Test1={Endpoint1.Property(EndpointProperty.Scheme)}://{Endpoint1.Property(EndpointProperty.IPV4Host)}:{Endpoint1.Property(EndpointProperty.Port)}/;Test2={Endpoint2.Property(EndpointProperty.Scheme)}://{Endpoint2.Property(EndpointProperty.Host)}:{Endpoint2.Property(EndpointProperty.Port)}/;") }, |
Member
There was a problem hiding this comment.
Can you add more tests instead of changing these?
Contributor
Author
There was a problem hiding this comment.
Will do - may not be until later this week I'm afraid.
Member
There was a problem hiding this comment.
I can merge and you can follow up 😄
mitchdenny
approved these changes
Feb 19, 2025
Member
|
@davidfowl wait for 9.2 for this one? |
Member
|
Yep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
EndpointProperty.HostAndPortHostAndPortinstead of concatenating Host and Port themselves.Fixes #7597
Checklist
<remarks />and<code />elements on your triple slash comments?breaking-changetemplate):EndpointProperty.HostAndPortin samples docs-aspire#2646Docs repo has a few places that could be optimised with
EndpointProperty.HostAndPortonce this is implementedhttps://github.com/dotnet/docs-aspire/blob/212a101a3526d6b59823fc8406680f86826dc40a/docs/extensibility/snippets/MailDevResource/MailDev.Hosting/MailDevResource.cs#L27
https://github.com/dotnet/docs-aspire/blob/212a101a3526d6b59823fc8406680f86826dc40a/docs/extensibility/snippets/MailDevResourceAndComponent/MailDev.Hosting/MailDevResource.cs#L27https://github.com/dotnet/docs-aspire/blob/212a101a3526d6b59823fc8406680f86826dc40a/docs/extensibility/custom-hosting-integration.md?plain=1#L360
https://github.com/dotnet/docs-aspire/blob/212a101a3526d6b59823fc8406680f86826dc40a/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDev.Hosting/MailDevResource.cs#L48