50 references to WithMetadata
Microsoft.AspNetCore.Components.Server.Tests (1)
ComponentEndpointRouteBuilderExtensionsTest.cs (1)
71
.
WithMetadata
("initial-md")
Microsoft.AspNetCore.Http.Connections (3)
ConnectionEndpointRouteBuilderExtensions.cs (3)
105
negotiateBuilder.
WithMetadata
(_negotiateMetadata);
106
negotiateBuilder.
WithMetadata
(options);
115
executeBuilder.
WithMetadata
(new DisableRequestTimeoutAttribute());
Microsoft.AspNetCore.OpenApi.Tests (11)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Paths.cs (2)
52
builder.MapGet("/api/todos", () => { }).
WithMetadata
(new EndpointGroupNameAttribute("v1"));
53
builder.MapGet("/api/users", () => { }).
WithMetadata
(new EndpointGroupNameAttribute("v2"));
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Responses.cs (9)
50
.
WithMetadata
(new ProducesResponseTypeMetadata(StatusCodes.Status400BadRequest, typeof(ProblemDetails), ["application/json+problem"]));
72
.
WithMetadata
(new ProducesResponseTypeMetadata(StatusCodes.Status200OK))
74
.
WithMetadata
(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(string), ["text/plain"]));
97
.
WithMetadata
(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(Todo), ["application/json"]))
99
.
WithMetadata
(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(TodoWithDueDate), ["application/json"]));
122
.
WithMetadata
(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(Todo), ["application/json", "application/xml"]));
151
.
WithMetadata
(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(TodoWithDueDate), ["application/json"]))
152
.
WithMetadata
(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(Todo), ["application/xml"]));
256
.
WithMetadata
(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(Todo), ["application/json"]));
Microsoft.AspNetCore.Routing (14)
Builder\FallbackEndpointRouteBuilderExtensions.cs (1)
80
conventionBuilder.
WithMetadata
(FallbackMetadata.Instance);
Builder\OpenApiRouteHandlerBuilderExtensions.cs (9)
26
=> builder.
WithMetadata
(_excludeFromDescriptionMetadataAttribute);
84
return builder.
WithMetadata
(new ProducesResponseTypeMetadata(statusCode, responseType ?? typeof(void)));
91
return builder.
WithMetadata
(new ProducesResponseTypeMetadata(statusCode, responseType ?? typeof(void), contentTypes));
130
return builder.
WithMetadata
(new ProducesResponseTypeMetadata(statusCode, typeof(ProblemDetails), [contentType]));
175
return builder.
WithMetadata
(new ProducesResponseTypeMetadata(statusCode, typeof(HttpValidationProblemDetails), [contentType]));
191
=> builder.
WithMetadata
(new TagsAttribute(tags));
280
return builder.
WithMetadata
(new AcceptsMetadata(contentTypes, requestType, isOptional));
291
=> builder.
WithMetadata
(new EndpointDescriptionAttribute(description));
301
=> builder.
WithMetadata
(new EndpointSummaryAttribute(summary));
Builder\RoutingEndpointConventionBuilderExtensions.cs (4)
110
builder.
WithMetadata
(new EndpointNameMetadata(endpointName), new RouteNameMetadata(endpointName));
125
builder.
WithMetadata
(new EndpointGroupNameAttribute(endpointGroupName));
183
builder.
WithMetadata
(new FormMappingOptionsMetadata(maxCollectionSize, maxRecursionDepth, maxKeySize));
218
builder.
WithMetadata
(new FormOptionsMetadata(bufferBody, memoryBufferThreshold, bufferBodyLengthLimit, valueCountLimit, keyLengthLimit, valueLengthLimit, multipartBoundaryLengthLimit, multipartHeadersCountLimit, multipartHeadersLengthLimit, multipartBodyLengthLimit));
Microsoft.AspNetCore.Routing.FunctionalTests (1)
MinimalFormTests.cs (1)
456
b.MapPost("/todo", ([FromForm] Todo todo) => todo).
WithMetadata
(new RequestSizeLimitMetadata(hasLimit ? 2 : null)));
Microsoft.AspNetCore.Routing.Tests (12)
Builder\GroupTest.cs (4)
323
inner.MapGet("/foo", () => "Hello World!").
WithMetadata
("/foo");
325
inner.
WithMetadata
("/inner");
326
outer.
WithMetadata
("/outer");
343
group.
WithMetadata
("/group");
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (3)
437
var endpointBuilder = map(builder, "/", context => Task.CompletedTask).
WithMetadata
(new EndpointNameMetadata("MapMe"));
460
var endpointBuilder = map(builder, "/", context => Task.CompletedTask).
WithMetadata
(new EndpointNameMetadata("MapMe"));
469
Assert.Throws<InvalidOperationException>(() => endpointBuilder.
WithMetadata
(new RouteNameMetadata("Foo")));
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (1)
499
Assert.Throws<InvalidOperationException>(() => endpointBuilder.
WithMetadata
(new RouteNameMetadata("Foo")));
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (4)
110
builder.
WithMetadata
("test", new HostAttribute("www.example.com", "example.com"));
130
var chainedBuilder = builder.
WithMetadata
("test");
179
builder.
WithMetadata
("test-metadata");
203
builder.
WithMetadata
("test-metadata");
Microsoft.AspNetCore.StaticFiles (4)
StaticFilesEndpointRouteBuilderExtensions.cs (4)
56
.
WithMetadata
(new HttpMethodMetadata(_supportedHttpMethods));
92
.
WithMetadata
(new HttpMethodMetadata(_supportedHttpMethods));
135
.
WithMetadata
(new HttpMethodMetadata(_supportedHttpMethods));
177
.
WithMetadata
(new HttpMethodMetadata(_supportedHttpMethods));
Mvc.RoutingWebSite (2)
StartupForRouteGroupsWithMetadata.cs (2)
41
.
WithMetadata
(new MetadataAttribute("A"))
47
.
WithMetadata
(new MetadataAttribute("B"));
RoutingWebSite (2)
UseEndpointRoutingStartup.cs (2)
105
}).
WithMetadata
(new RouteNameMetadata(routeName: "WithSingleAsteriskCatchAll"));
117
}).
WithMetadata
(new RouteNameMetadata(routeName: "WithDoubleAsteriskCatchAll"));