48 instantiations of AsParametersAttribute
Microsoft.AspNetCore.Http.Extensions.Tests (22)
RequestDelegateFactoryTests.cs (20)
828void TestImpliedFromBodyStruct_ParameterList([AsParameters] ParametersListWithImplictFromBody args) 847void TestExplicitFromBody_ParameterList([AsParameters] ParametersListWithExplictFromBody args) 1014void TestParameterListRecord([AsParameters] BadArgumentListRecord req) { } 1015void TestParameterListClass([AsParameters] BadArgumentListClass req) { } 1016void TestParameterListClassWithMutipleConstructors([AsParameters] BadArgumentListClassMultipleCtors req) { } 1017void TestParameterListAbstractClass([AsParameters] BadAbstractArgumentListClass req) { } 1018void TestParameterListNoPulicConstructorClass([AsParameters] BadNoPublicConstructorArgumentListClass req) { } 1056void TestNestedParameterListRecordOnType([AsParameters] NestedArgumentListRecord req) { } 1057void TestNestedParameterListRecordOnArgument([AsParameters] ClassWithParametersConstructor req) { } 1076void TestExplicitFromService_FromParameterList([AsParameters] ParametersListWithExplictFromService args) 1110void TestImpliedFromService_FromParameterList([AsParameters] ParametersListWithImplictFromService args) 2112void TestParameterListRecordStruct([AsParameters] ParameterListRecordStruct? args) 2115void TestParameterListRecordClass([AsParameters] ParameterListRecordClass? args) 2118void TestParameterListStruct([AsParameters] ParameterListStruct? args) 2121void TestParameterListClass([AsParameters] ParameterListClass? args) 2148void TestAction(HttpContext context, [AsParameters] SampleParameterList args, [AsParameters] SampleParameterList args2) 3164static void TestAction([AsParameters] ParameterListRequiredNullableStringFromDifferentSources args) 3218void TestAction([AsParameters] ParameterListFromHeaderCommaSeparatedValues args) 3267static void TestAction([AsParameters] ParameterListMixedRequiredStringsFromDifferentSources args) { }
RequestDelegateGenerator\SharedTypes.cs (2)
916public record NestedArgumentListRecord([AsParameters] object NestedParameterList); 920public ClassWithParametersConstructor([AsParameters] object nestedParameterList)
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (2)
916public record NestedArgumentListRecord([AsParameters] object NestedParameterList); 920public ClassWithParametersConstructor([AsParameters] object nestedParameterList)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (11)
EndpointMetadataApiDescriptionProviderTest.cs (11)
921AssertParameters(GetApiDescription(([AsParameters] ArgumentListClass req) => { }, httpMethods: ["POST"])); 922AssertParameters(GetApiDescription(([AsParameters] ArgumentListClassWithReadOnlyProperties req) => { }, httpMethods: ["POST"])); 923AssertParameters(GetApiDescription(([AsParameters] ArgumentListStruct req) => { }, httpMethods: ["POST"])); 924AssertParameters(GetApiDescription(([AsParameters] ArgumentListRecord req) => { }, httpMethods: ["POST"])); 925AssertParameters(GetApiDescription(([AsParameters] ArgumentListRecordStruct req) => { }, httpMethods: ["POST"])); 926AssertParameters(GetApiDescription(([AsParameters] ArgumentListRecordWithoutPositionalParameters req) => { }, httpMethods: ["POST"])); 927AssertParameters(GetApiDescription(([AsParameters] ArgumentListRecordWithoutAttributes req) => { }, "/{foo}", httpMethods: ["POST"]), "foo"); 928AssertParameters(GetApiDescription(([AsParameters] ArgumentListRecordWithoutAttributes req) => { }, "/{Foo}", httpMethods: ["POST"])); 943var apiDescription = GetApiDescription(([AsParameters] AsParametersWithRequiredMembers foo) => { }); 956var apiDescription = GetApiDescription(([AsParameters] AsParametersWithRequiredMembers foo) => { }); 973var apiDescription = GetApiDescription(([AsParameters] AsParametersWithRequiredMembersObliviousContext foo) => { });
Microsoft.AspNetCore.OpenApi.Tests (13)
Services\OpenApiGeneratorTests.cs (10)
497AssertParameters(GetOpenApiOperation(([AsParameters] ArgumentListClass req) => { })); 498AssertParameters(GetOpenApiOperation(([AsParameters] ArgumentListClassWithReadOnlyProperties req) => { })); 499AssertParameters(GetOpenApiOperation(([AsParameters] ArgumentListStruct req) => { })); 500AssertParameters(GetOpenApiOperation(([AsParameters] ArgumentListRecord req) => { })); 501AssertParameters(GetOpenApiOperation(([AsParameters] ArgumentListRecordStruct req) => { })); 502AssertParameters(GetOpenApiOperation(([AsParameters] ArgumentListRecordWithoutPositionalParameters req) => { })); 503AssertParameters(GetOpenApiOperation(([AsParameters] ArgumentListRecordWithoutAttributes req) => { }, "/{foo}"), "foo"); 504AssertParameters(GetOpenApiOperation(([AsParameters] ArgumentListRecordWithoutAttributes req) => { }, "/{Foo}")); 985var operation = GetOpenApiOperation(([AsParameters] AsParametersWithRequiredMembers foo) => { }); 1005var operation = GetOpenApiOperation(([AsParameters] AsParametersWithRequiredMembersObliviousContext foo) => { });
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (3)
260builder.MapGet("/api/{id}/{date}", ([AsParameters] RouteParamsContainer routeParams) => { }); 526builder.MapGet("/api", ([AsParameters] FromQueryModel model) => { }); 557builder.MapGet("/api", ([AsParameters] FromQueryModel model) => { });
11 references to AsParametersAttribute
Microsoft.AspNetCore.Http.Extensions (5)
RequestDelegateFactory.cs (2)
824else if (parameterCustomAttributes.OfType<AsParametersAttribute>().Any()) 830$"Nested {nameof(AsParametersAttribute)} is not supported and should be used only for handler parameters.");
src\Shared\PropertyAsParameterInfo.cs (3)
55/// Unwraps all parameters that contains <see cref="AsParametersAttribute"/> and 57/// parameters that contain a <see cref="AsParametersAttribute"/>, and all additional 84if (parameters[i].CustomAttributes.Any(a => a.AttributeType == typeof(AsParametersAttribute)))
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
src\Shared\PropertyAsParameterInfo.cs (3)
55/// Unwraps all parameters that contains <see cref="AsParametersAttribute"/> and 57/// parameters that contain a <see cref="AsParametersAttribute"/>, and all additional 84if (parameters[i].CustomAttributes.Any(a => a.AttributeType == typeof(AsParametersAttribute)))
Microsoft.AspNetCore.OpenApi (3)
src\Shared\PropertyAsParameterInfo.cs (3)
55/// Unwraps all parameters that contains <see cref="AsParametersAttribute"/> and 57/// parameters that contain a <see cref="AsParametersAttribute"/>, and all additional 84if (parameters[i].CustomAttributes.Any(a => a.AttributeType == typeof(AsParametersAttribute)))