50 instantiations of FromHeader
ApiExplorerWebSite (1)
Models\OrderDTO.cs (1)
12[FromHeader(Name = "Referrer")]
ApplicationModelWebSite (1)
Controllers\HomeController.cs (1)
17public object GetHelloWorld([FromHeader] string helloWorld)
Aspire.Dashboard (1)
DashboardEndpointsBuilder.cs (1)
42endpoints.MapGet("/api/set-language", async (string? language, string? redirectUrl, [FromHeader(Name = "Accept-Language")] string? acceptLanguage, HttpContext httpContext) =>
Aspire.Dashboard.Tests (1)
Integration\MockOpenIdAuthority.cs (1)
46(HttpRequest request, [FromHeader] string host) =>
BasicWebSite (1)
Controllers\TestingController.cs (1)
27[FromHeader(Name = "X-Pass-Thru")] string passThruValue)
GenericHostWebSite (1)
Controllers\TestingController.cs (1)
26[FromHeader(Name = "X-Pass-Thru")] string passThruValue)
HtmlGenerationWebSite (1)
Controllers\Catalog_CacheTagHelperController.cs (1)
13public IActionResult Splash(int categoryId, int correlationId, [FromHeader] string locale)
Microsoft.AspNetCore.Http.Extensions.Tests (4)
RequestDelegateGenerator\SharedTypes.cs (4)
698public record ParameterListFromHeader(HttpContext HttpContext, [FromHeader(Name = "X-Custom-Header")] int Value); 703[FromHeader(Name = "X-Custom-Header")] 774public ParameterListStructWithMultipleParameterizedContructor(HttpContext httpContext, [FromHeader(Name = "Value")] int value) 860[FromHeader]
Microsoft.AspNetCore.Http.Microbenchmarks (4)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (4)
698public record ParameterListFromHeader(HttpContext HttpContext, [FromHeader(Name = "X-Custom-Header")] int Value); 703[FromHeader(Name = "X-Custom-Header")] 774public ParameterListStructWithMultipleParameterizedContructor(HttpContext httpContext, [FromHeader(Name = "Value")] int value) 860[FromHeader]
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (6)
DefaultApiDescriptionProviderTest.cs (5)
2474private void AcceptsId_Header([FromHeader] int id) 2566private void FromHeader([FromHeader] int id) 2592[FromHeader] 2715[FromHeader] 2783[FromHeader(Name = "Name")]
EndpointMetadataApiDescriptionProviderTest.cs (1)
570var apiDescription = GetApiDescription(([FromHeader] int foo) => { });
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\Metadata\ModelAttributesTest.cs (1)
309[FromHeader]
Microsoft.AspNetCore.Mvc.IntegrationTests (15)
ComplexRecordIntegrationTest.cs (2)
2896private record LocationInfo([FromHeader] string GpsCoordinates, int Zipcode); 3709[FromHeader]
ComplexTypeIntegrationTestBase.cs (1)
3096[FromHeader]
HeaderModelBinderIntegrationTest.cs (12)
21[FromHeader(Name = "Header")] 153[FromHeader(Name = "Header")] 200[FromHeader(Name = "Header")] 449[FromHeader] 452[FromHeader(Name = "OneCommaSeparatedString")] 455[FromHeader] 458[FromHeader] 461[FromHeader] 464[FromHeader] 467[FromHeader(Name = "EnumerableOfDouble")] 470[FromHeader] 473[FromHeader(Name = "ListOfOrderWithTypeConverter")]
Microsoft.AspNetCore.OpenApi.Tests (13)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Parameters.cs (10)
21builder.MapGet("/api", ([FromHeader(Name = "X-Header")] string header) => { }); 100builder.MapGet("/api/todos", ([FromHeader(Name = "X-Header")] string header) => { }); 101builder.MapGet("/api/users", ([FromHeader(Name = "X-Header")] Guid? header) => { }); 102builder.MapGet("/api/projects", ([FromHeader(Name = "X-Header")] string header = "0000-0000-0000-0000") => { }); 176builder.MapGet("/api/accept", ([FromHeader(Name = "Accept")] string value) => { }); 177builder.MapGet("/api/accept-lower", ([FromHeader(Name = "accept")] string value) => { }); 178builder.MapGet("/api/authorization", ([FromHeader(Name = "Authorization")] string value) => { }); 179builder.MapGet("/api/authorization-lower", ([FromHeader(Name = "authorization")] string value) => { }); 180builder.MapGet("/api/content-type", ([FromHeader(Name = "Content-Type")] string value) => { }); 181builder.MapGet("/api/content-type-lower", ([FromHeader(Name = "content-type")] string value) => { });
Services\OpenApiGeneratorTests.cs (2)
401var operation = GetOpenApiOperation(([FromHeader] int foo) => { }); 939ValidateParameter(GetOpenApiOperation(([FromHeader(Name = "headerName")] string param) => ""), "headerName");
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (1)
439builder.MapGet("/api-4", ([Required][FromHeader] DateTime date) => { });
3 references to FromHeader
ApplicationModelWebSite (1)
Conventions\FromHeaderConvention.cs (1)
15if (param.Attributes.Any(p => p.GetType() == typeof(FromHeaderAttribute)))
Microsoft.AspNetCore.Mvc.Core.Test (2)
ModelBinding\Metadata\ModelAttributesTest.cs (2)
47Assert.Single(attributes.Attributes.OfType<FromHeaderAttribute>()); 56Assert.Single(attributes.PropertyAttributes.OfType<FromHeaderAttribute>());