48 references to WithMetadata
Microsoft.AspNetCore.Components.Server.Tests (1)
ComponentEndpointRouteBuilderExtensionsTest.cs (1)
71.WithMetadata("initial-md")
Microsoft.AspNetCore.Http.Connections (3)
ConnectionEndpointRouteBuilderExtensions.cs (3)
105negotiateBuilder.WithMetadata(_negotiateMetadata); 106negotiateBuilder.WithMetadata(options); 115executeBuilder.WithMetadata(new DisableRequestTimeoutAttribute());
Microsoft.AspNetCore.OpenApi.Tests (11)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Paths.cs (2)
52builder.MapGet("/api/todos", () => { }).WithMetadata(new EndpointGroupNameAttribute("v1")); 53builder.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 (12)
Builder\FallbackEndpointRouteBuilderExtensions.cs (1)
80conventionBuilder.WithMetadata(FallbackMetadata.Instance);
Builder\OpenApiRouteHandlerBuilderExtensions.cs (7)
26=> builder.WithMetadata(_excludeFromDescriptionMetadataAttribute); 84return builder.WithMetadata(new ProducesResponseTypeMetadata(statusCode, responseType ?? typeof(void))); 91return builder.WithMetadata(new ProducesResponseTypeMetadata(statusCode, responseType ?? typeof(void), contentTypes)); 146=> builder.WithMetadata(new TagsAttribute(tags)); 235return builder.WithMetadata(new AcceptsMetadata(contentTypes, requestType, isOptional)); 246=> builder.WithMetadata(new EndpointDescriptionAttribute(description)); 256=> builder.WithMetadata(new EndpointSummaryAttribute(summary));
Builder\RoutingEndpointConventionBuilderExtensions.cs (4)
110builder.WithMetadata(new EndpointNameMetadata(endpointName), new RouteNameMetadata(endpointName)); 125builder.WithMetadata(new EndpointGroupNameAttribute(endpointGroupName)); 183builder.WithMetadata(new FormMappingOptionsMetadata(maxCollectionSize, maxRecursionDepth, maxKeySize)); 218builder.WithMetadata(new FormOptionsMetadata(bufferBody, memoryBufferThreshold, bufferBodyLengthLimit, valueCountLimit, keyLengthLimit, valueLengthLimit, multipartBoundaryLengthLimit, multipartHeadersCountLimit, multipartHeadersLengthLimit, multipartBodyLengthLimit));
Microsoft.AspNetCore.Routing.FunctionalTests (1)
MinimalFormTests.cs (1)
457b.MapPost("/todo", ([FromForm] Todo todo) => todo).WithMetadata(new RequestSizeLimitMetadata(hasLimit ? 2 : null)));
Microsoft.AspNetCore.Routing.Tests (12)
Builder\GroupTest.cs (4)
323inner.MapGet("/foo", () => "Hello World!").WithMetadata("/foo"); 325inner.WithMetadata("/inner"); 326outer.WithMetadata("/outer"); 343group.WithMetadata("/group");
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (3)
437var endpointBuilder = map(builder, "/", context => Task.CompletedTask).WithMetadata(new EndpointNameMetadata("MapMe")); 460var endpointBuilder = map(builder, "/", context => Task.CompletedTask).WithMetadata(new EndpointNameMetadata("MapMe")); 469Assert.Throws<InvalidOperationException>(() => endpointBuilder.WithMetadata(new RouteNameMetadata("Foo")));
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (1)
499Assert.Throws<InvalidOperationException>(() => endpointBuilder.WithMetadata(new RouteNameMetadata("Foo")));
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (4)
110builder.WithMetadata("test", new HostAttribute("www.example.com", "example.com")); 130var chainedBuilder = builder.WithMetadata("test"); 179builder.WithMetadata("test-metadata"); 203builder.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"));