Skip to content

Conversation

@captainsafia
Copy link
Member

Fixes #35314.

@ghost ghost added the area-runtime label Aug 16, 2021
@captainsafia captainsafia marked this pull request as ready for review August 16, 2021 18:01
@captainsafia captainsafia requested a review from javiercn as a code owner August 16, 2021 18:01
public static TBuilder WithName<TBuilder>(this TBuilder builder, string endpointName) where TBuilder : IEndpointConventionBuilder
{
builder.WithMetadata(new EndpointNameAttribute(endpointName));
builder.WithMetadata(new EndpointNameAttribute(endpointName), new RouteNameMetadata(endpointName));
Copy link
Member

Choose a reason for hiding this comment

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

I see that both IEndpointNameMetadata and IRouteNameMetadata have been around in the same namespace and assembly since at least 3.0. The doc comments for both indicate that they're used for link-generation.

@pranavkm @JamesNK Do either of you know why we have a route name and an enpoint name and how they're used differently?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I don't know. I didn't touch link generation much. When I worked on routing I focused on endpoint generation and route matching.

@captainsafia captainsafia merged commit a0193e2 into main Aug 16, 2021
@captainsafia captainsafia deleted the safia/with-name-fix branch August 16, 2021 22:42
@ghost ghost added this to the 6.0-rc1 milestone Aug 16, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't find minimal endpoint named via WithName() when using Results.CreatedAt

7 participants