Skip to content

Commit 48e1e34

Browse files
committed
Remove "Convention" from new type names
1 parent d58da50 commit 48e1e34

File tree

4 files changed

+70
-70
lines changed

4 files changed

+70
-70
lines changed

src/Http/Routing/src/Builder/EndpointRouteBuilderExtensions.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public static IEndpointConventionBuilder Map(
199199
/// <param name="pattern">The route pattern.</param>
200200
/// <param name="handler">The delegate executed when the endpoint is matched.</param>
201201
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
202-
public static RouteHandlerConventionBuilder MapGet(
202+
public static RouteHandlerBuilder MapGet(
203203
this IEndpointRouteBuilder endpoints,
204204
string pattern,
205205
Delegate handler)
@@ -215,7 +215,7 @@ public static RouteHandlerConventionBuilder MapGet(
215215
/// <param name="pattern">The route pattern.</param>
216216
/// <param name="handler">The delegate executed when the endpoint is matched.</param>
217217
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
218-
public static RouteHandlerConventionBuilder MapPost(
218+
public static RouteHandlerBuilder MapPost(
219219
this IEndpointRouteBuilder endpoints,
220220
string pattern,
221221
Delegate handler)
@@ -231,7 +231,7 @@ public static RouteHandlerConventionBuilder MapPost(
231231
/// <param name="pattern">The route pattern.</param>
232232
/// <param name="handler">The delegate executed when the endpoint is matched.</param>
233233
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
234-
public static RouteHandlerConventionBuilder MapPut(
234+
public static RouteHandlerBuilder MapPut(
235235
this IEndpointRouteBuilder endpoints,
236236
string pattern,
237237
Delegate handler)
@@ -247,7 +247,7 @@ public static RouteHandlerConventionBuilder MapPut(
247247
/// <param name="pattern">The route pattern.</param>
248248
/// <param name="handler">The delegate executed when the endpoint is matched.</param>
249249
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
250-
public static RouteHandlerConventionBuilder MapDelete(
250+
public static RouteHandlerBuilder MapDelete(
251251
this IEndpointRouteBuilder endpoints,
252252
string pattern,
253253
Delegate handler)
@@ -264,7 +264,7 @@ public static RouteHandlerConventionBuilder MapDelete(
264264
/// <param name="handler">The delegate executed when the endpoint is matched.</param>
265265
/// <param name="httpMethods">HTTP methods that the endpoint will match.</param>
266266
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
267-
public static RouteHandlerConventionBuilder MapMethods(
267+
public static RouteHandlerBuilder MapMethods(
268268
this IEndpointRouteBuilder endpoints,
269269
string pattern,
270270
IEnumerable<string> httpMethods,
@@ -311,7 +311,7 @@ static bool ShouldDisableInferredBody(string method)
311311
/// <param name="pattern">The route pattern.</param>
312312
/// <param name="handler">The delegate executed when the endpoint is matched.</param>
313313
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
314-
public static RouteHandlerConventionBuilder Map(
314+
public static RouteHandlerBuilder Map(
315315
this IEndpointRouteBuilder endpoints,
316316
string pattern,
317317
Delegate handler)
@@ -327,7 +327,7 @@ public static RouteHandlerConventionBuilder Map(
327327
/// <param name="pattern">The route pattern.</param>
328328
/// <param name="handler">The delegate executed when the endpoint is matched.</param>
329329
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
330-
public static RouteHandlerConventionBuilder Map(
330+
public static RouteHandlerBuilder Map(
331331
this IEndpointRouteBuilder endpoints,
332332
RoutePattern pattern,
333333
Delegate handler)
@@ -354,7 +354,7 @@ public static RouteHandlerConventionBuilder Map(
354354
/// <c>{*path:nonfile}</c>. The order of the registered endpoint will be <c>int.MaxValue</c>.
355355
/// </para>
356356
/// </remarks>
357-
public static RouteHandlerConventionBuilder MapFallback(this IEndpointRouteBuilder endpoints, Delegate handler)
357+
public static RouteHandlerBuilder MapFallback(this IEndpointRouteBuilder endpoints, Delegate handler)
358358
{
359359
if (endpoints == null)
360360
{
@@ -390,7 +390,7 @@ public static RouteHandlerConventionBuilder MapFallback(this IEndpointRouteBuild
390390
/// to exclude requests for static files.
391391
/// </para>
392392
/// </remarks>
393-
public static RouteHandlerConventionBuilder MapFallback(
393+
public static RouteHandlerBuilder MapFallback(
394394
this IEndpointRouteBuilder endpoints,
395395
string pattern,
396396
Delegate handler)
@@ -416,7 +416,7 @@ public static RouteHandlerConventionBuilder MapFallback(
416416
return conventionBuilder;
417417
}
418418

419-
private static RouteHandlerConventionBuilder Map(
419+
private static RouteHandlerBuilder Map(
420420
this IEndpointRouteBuilder endpoints,
421421
RoutePattern pattern,
422422
Delegate handler,
@@ -506,7 +506,7 @@ private static RouteHandlerConventionBuilder Map(
506506
endpoints.DataSources.Add(dataSource);
507507
}
508508

509-
return new RouteHandlerConventionBuilder(dataSource.AddEndpointBuilder(builder));
509+
return new RouteHandlerBuilder(dataSource.AddEndpointBuilder(builder));
510510
}
511511
}
512512
}

src/Http/Routing/src/Builder/OpenApiDelegateEndpointConventionBuilderExtensions.cs renamed to src/Http/Routing/src/Builder/OpenApiRouteHandlerBuilderExtensions.cs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ namespace Microsoft.AspNetCore.Http
1212
/// Extension methods for adding <see cref="Endpoint.Metadata"/> that is
1313
/// meant to be consumed by OpenAPI libraries.
1414
/// </summary>
15-
public static class OpenApiRouteHandlerConventionBuilderExtensions
15+
public static class OpenApiRouteHandlerBuilderExtensions
1616
{
1717
private static readonly ExcludeFromDescriptionAttribute _excludeFromDescriptionMetadataAttribute = new();
1818

1919
/// <summary>
2020
/// Adds the <see cref="IExcludeFromDescriptionMetadata"/> to <see cref="EndpointBuilder.Metadata"/> for all builders
2121
/// produced by <paramref name="builder"/>.
2222
/// </summary>
23-
/// <param name="builder">The <see cref="RouteHandlerConventionBuilder"/>.</param>
24-
/// <returns>A <see cref="RouteHandlerConventionBuilder"/> that can be used to further customize the endpoint.</returns>
25-
public static RouteHandlerConventionBuilder ExcludeFromDescription(this RouteHandlerConventionBuilder builder)
23+
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
24+
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
25+
public static RouteHandlerBuilder ExcludeFromDescription(this RouteHandlerBuilder builder)
2626
{
2727
builder.WithMetadata(_excludeFromDescriptionMetadataAttribute);
2828

@@ -34,13 +34,13 @@ public static RouteHandlerConventionBuilder ExcludeFromDescription(this RouteHan
3434
/// produced by <paramref name="builder"/>.
3535
/// </summary>
3636
/// <typeparam name="TResponse">The type of the response.</typeparam>
37-
/// <param name="builder">The <see cref="RouteHandlerConventionBuilder"/>.</param>
37+
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
3838
/// <param name="statusCode">The response status code. Defaults to <see cref="StatusCodes.Status200OK"/>.</param>
3939
/// <param name="contentType">The response content type. Defaults to "application/json".</param>
4040
/// <param name="additionalContentTypes">Additional response content types the endpoint produces for the supplied status code.</param>
41-
/// <returns>A <see cref="RouteHandlerConventionBuilder"/> that can be used to further customize the endpoint.</returns>
41+
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
4242
#pragma warning disable RS0026
43-
public static RouteHandlerConventionBuilder Produces<TResponse>(this RouteHandlerConventionBuilder builder,
43+
public static RouteHandlerBuilder Produces<TResponse>(this RouteHandlerBuilder builder,
4444
#pragma warning restore RS0026
4545
int statusCode = StatusCodes.Status200OK,
4646
string? contentType = null,
@@ -53,14 +53,14 @@ public static RouteHandlerConventionBuilder Produces<TResponse>(this RouteHandle
5353
/// Adds an <see cref="IProducesResponseTypeMetadata"/> to <see cref="EndpointBuilder.Metadata"/> for all builders
5454
/// produced by <paramref name="builder"/>.
5555
/// </summary>
56-
/// <param name="builder">The <see cref="RouteHandlerConventionBuilder"/>.</param>
56+
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
5757
/// <param name="statusCode">The response status code.</param>
5858
/// <param name="responseType">The type of the response. Defaults to null.</param>
5959
/// <param name="contentType">The response content type. Defaults to "application/json" if responseType is not null, otherwise defaults to null.</param>
6060
/// <param name="additionalContentTypes">Additional response content types the endpoint produces for the supplied status code.</param>
61-
/// <returns>A <see cref="RouteHandlerConventionBuilder"/> that can be used to further customize the endpoint.</returns>
61+
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
6262
#pragma warning disable RS0026
63-
public static RouteHandlerConventionBuilder Produces(this RouteHandlerConventionBuilder builder,
63+
public static RouteHandlerBuilder Produces(this RouteHandlerBuilder builder,
6464
#pragma warning restore RS0026
6565
int statusCode,
6666
Type? responseType = null,
@@ -87,11 +87,11 @@ public static RouteHandlerConventionBuilder Produces(this RouteHandlerConvention
8787
/// Adds an <see cref="IProducesResponseTypeMetadata"/> with a <see cref="ProblemDetails"/> type
8888
/// to <see cref="EndpointBuilder.Metadata"/> for all builders produced by <paramref name="builder"/>.
8989
/// </summary>
90-
/// <param name="builder">The <see cref="RouteHandlerConventionBuilder"/>.</param>
90+
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
9191
/// <param name="statusCode">The response status code.</param>
9292
/// <param name="contentType">The response content type. Defaults to "application/problem+json".</param>
93-
/// <returns>A <see cref="RouteHandlerConventionBuilder"/> that can be used to further customize the endpoint.</returns>
94-
public static RouteHandlerConventionBuilder ProducesProblem(this RouteHandlerConventionBuilder builder,
93+
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
94+
public static RouteHandlerBuilder ProducesProblem(this RouteHandlerBuilder builder,
9595
int statusCode,
9696
string? contentType = null)
9797
{
@@ -107,11 +107,11 @@ public static RouteHandlerConventionBuilder ProducesProblem(this RouteHandlerCon
107107
/// Adds an <see cref="IProducesResponseTypeMetadata"/> with a <see cref="HttpValidationProblemDetails"/> type
108108
/// to <see cref="EndpointBuilder.Metadata"/> for all builders produced by <paramref name="builder"/>.
109109
/// </summary>
110-
/// <param name="builder">The <see cref="RouteHandlerConventionBuilder"/>.</param>
110+
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
111111
/// <param name="statusCode">The response status code. Defaults to <see cref="StatusCodes.Status400BadRequest"/>.</param>
112112
/// <param name="contentType">The response content type. Defaults to "application/validationproblem+json".</param>
113-
/// <returns>A <see cref="RouteHandlerConventionBuilder"/> that can be used to further customize the endpoint.</returns>
114-
public static RouteHandlerConventionBuilder ProducesValidationProblem(this RouteHandlerConventionBuilder builder,
113+
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
114+
public static RouteHandlerBuilder ProducesValidationProblem(this RouteHandlerBuilder builder,
115115
int statusCode = StatusCodes.Status400BadRequest,
116116
string? contentType = null)
117117
{
@@ -132,10 +132,10 @@ public static RouteHandlerConventionBuilder ProducesValidationProblem(this Route
132132
/// into related groups. These tags are typically included in the generated specification
133133
/// and are typically used to group operations by tags in the UI.
134134
/// </remarks>
135-
/// <param name="builder">The <see cref="RouteHandlerConventionBuilder"/>.</param>
135+
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
136136
/// <param name="tags">A collection of tags to be associated with the endpoint.</param>
137-
/// <returns>A <see cref="RouteHandlerConventionBuilder"/> that can be used to further customize the endpoint.</returns>
138-
public static RouteHandlerConventionBuilder WithTags(this RouteHandlerConventionBuilder builder, params string[] tags)
137+
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
138+
public static RouteHandlerBuilder WithTags(this RouteHandlerBuilder builder, params string[] tags)
139139
{
140140
builder.WithMetadata(new TagsAttribute(tags));
141141
return builder;
@@ -146,11 +146,11 @@ public static RouteHandlerConventionBuilder WithTags(this RouteHandlerConvention
146146
/// produced by <paramref name="builder"/>.
147147
/// </summary>
148148
/// <typeparam name="TRequest">The type of the request body.</typeparam>
149-
/// <param name="builder">The <see cref="RouteHandlerConventionBuilder"/>.</param>
149+
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
150150
/// <param name="contentType">The request content type that the endpoint accepts.</param>
151151
/// <param name="additionalContentTypes">The list of additional request content types that the endpoint accepts.</param>
152-
/// <returns>A <see cref="RouteHandlerConventionBuilder"/> that can be used to further customize the endpoint.</returns>
153-
public static RouteHandlerConventionBuilder Accepts<TRequest>(this RouteHandlerConventionBuilder builder,
152+
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
153+
public static RouteHandlerBuilder Accepts<TRequest>(this RouteHandlerBuilder builder,
154154
string contentType, params string[] additionalContentTypes) where TRequest : notnull
155155
{
156156
Accepts(builder, typeof(TRequest), contentType, additionalContentTypes);
@@ -163,12 +163,12 @@ public static RouteHandlerConventionBuilder Accepts<TRequest>(this RouteHandlerC
163163
/// produced by <paramref name="builder"/>.
164164
/// </summary>
165165
/// <typeparam name="TRequest">The type of the request body.</typeparam>
166-
/// <param name="builder">The <see cref="RouteHandlerConventionBuilder"/>.</param>
166+
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
167167
/// <param name="isOptional">Sets a value that determines if the request body is optional.</param>
168168
/// <param name="contentType">The request content type that the endpoint accepts.</param>
169169
/// <param name="additionalContentTypes">The list of additional request content types that the endpoint accepts.</param>
170-
/// <returns>A <see cref="RouteHandlerConventionBuilder"/> that can be used to further customize the endpoint.</returns>
171-
public static RouteHandlerConventionBuilder Accepts<TRequest>(this RouteHandlerConventionBuilder builder,
170+
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
171+
public static RouteHandlerBuilder Accepts<TRequest>(this RouteHandlerBuilder builder,
172172
bool isOptional, string contentType, params string[] additionalContentTypes) where TRequest : notnull
173173
{
174174
Accepts(builder, typeof(TRequest), isOptional, contentType, additionalContentTypes);
@@ -180,12 +180,12 @@ public static RouteHandlerConventionBuilder Accepts<TRequest>(this RouteHandlerC
180180
/// Adds <see cref="IAcceptsMetadata"/> to <see cref="EndpointBuilder.Metadata"/> for all builders
181181
/// produced by <paramref name="builder"/>.
182182
/// </summary>
183-
/// <param name="builder">The <see cref="RouteHandlerConventionBuilder"/>.</param>
183+
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
184184
/// <param name="requestType">The type of the request body.</param>
185185
/// <param name="contentType">The request content type that the endpoint accepts.</param>
186186
/// <param name="additionalContentTypes">The list of additional request content types that the endpoint accepts.</param>
187-
/// <returns>A <see cref="RouteHandlerConventionBuilder"/> that can be used to further customize the endpoint.</returns>
188-
public static RouteHandlerConventionBuilder Accepts(this RouteHandlerConventionBuilder builder,
187+
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
188+
public static RouteHandlerBuilder Accepts(this RouteHandlerBuilder builder,
189189
Type requestType, string contentType, params string[] additionalContentTypes)
190190
{
191191
builder.WithMetadata(new AcceptsMetadata(requestType, false, GetAllContentTypes(contentType, additionalContentTypes)));
@@ -197,13 +197,13 @@ public static RouteHandlerConventionBuilder Accepts(this RouteHandlerConventionB
197197
/// Adds <see cref="IAcceptsMetadata"/> to <see cref="EndpointBuilder.Metadata"/> for all builders
198198
/// produced by <paramref name="builder"/>.
199199
/// </summary>
200-
/// <param name="builder">The <see cref="RouteHandlerConventionBuilder"/>.</param>
200+
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
201201
/// <param name="requestType">The type of the request body.</param>
202202
/// <param name="isOptional">Sets a value that determines if the request body is optional.</param>
203203
/// <param name="contentType">The request content type that the endpoint accepts.</param>
204204
/// <param name="additionalContentTypes">The list of additional request content types that the endpoint accepts.</param>
205-
/// <returns>A <see cref="RouteHandlerConventionBuilder"/> that can be used to further customize the endpoint.</returns>
206-
public static RouteHandlerConventionBuilder Accepts(this RouteHandlerConventionBuilder builder,
205+
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
206+
public static RouteHandlerBuilder Accepts(this RouteHandlerBuilder builder,
207207
Type requestType, bool isOptional, string contentType, params string[] additionalContentTypes)
208208
{
209209
builder.WithMetadata(new AcceptsMetadata(requestType, isOptional, GetAllContentTypes(contentType, additionalContentTypes)));

0 commit comments

Comments
 (0)