43 instantiations of RequestDelegateFactoryOptions
Microsoft.AspNetCore.Http.Extensions.Tests (41)
RequestDelegateFactoryTests.cs (34)
106var factoryResult = RequestDelegateFactory.Create(@delegate, new RequestDelegateFactoryOptions() 249new() { RouteParameterNames = null }); 291RequestDelegateFactory.Create(([FromRoute] int id) => { }, new() { RouteParameterNames = Array.Empty<string>() })); 614var factoryResult = RequestDelegateFactory.Create(StoreNullableIntArray, new() { DisableInferBodyFromParameters = true }); 758var factoryResult = RequestDelegateFactory.Create(StoreNullableIntArray, new() { ThrowOnBadRequest = true, DisableInferBodyFromParameters = true }); 872var factoryResult = RequestDelegateFactory.Create(action, new RequestDelegateFactoryOptions() { ServiceProvider = mock.Object }); 1184var factoryResult = RequestDelegateFactory.Create(action, options: new() { ServiceProvider = services }); 1412Assert.Throws<NotSupportedException>(() => RequestDelegateFactory.Create(TestAction, new() { ServiceProvider = httpContext.RequestServices })); 1567var factoryResult = RequestDelegateFactory.Create(@delegate, new() 1746RequestDelegateFactoryOptions options = new() { ServiceProvider = services }; 2166var factoryResult = RequestDelegateFactory.Create(methodInfo!, null, new RequestDelegateFactoryOptions() 2209var factoryResult = RequestDelegateFactory.Create(methodInfo!, targetFactory, new RequestDelegateFactoryOptions() 2281var factoryResult = RequestDelegateFactory.Create(@delegate, new RequestDelegateFactoryOptions() 2376var factoryResult = RequestDelegateFactory.Create(@delegate, new RequestDelegateFactoryOptions() 2410var factoryResult = RequestDelegateFactory.Create(HandlerWithTaskAwait, new RequestDelegateFactoryOptions() 2495var factoryResult = RequestDelegateFactory.Create(@delegate, new RequestDelegateFactoryOptions() 2560var options = new RequestDelegateFactoryOptions { EndpointBuilder = CreateEndpointBuilder(new List<object> { customMetadata }) }; 2673var options = new RequestDelegateFactoryOptions 2695var options = new RequestDelegateFactoryOptions 2718var options = new RequestDelegateFactoryOptions 2741var options = new RequestDelegateFactoryOptions 2764var options = new RequestDelegateFactoryOptions 2785var options = new RequestDelegateFactoryOptions 2806var options = new RequestDelegateFactoryOptions 2843var options = new RequestDelegateFactoryOptions 2867var options = new RequestDelegateFactoryOptions 2901var options = new RequestDelegateFactoryOptions 2922var options = new RequestDelegateFactoryOptions 3004var options = new RequestDelegateFactoryOptions(); 3022var result = RequestDelegateFactory.Create(@delegate, new() { ServiceProvider = serviceProvider }); 3037var result = RequestDelegateFactory.Create(@delegate, new() { ServiceProvider = serviceProvider }); 3049RequestDelegateFactoryOptions options = new() 3076RequestDelegateFactoryOptions options = new() 3092var result = RequestDelegateFactory.Create(@delegate, new RequestDelegateFactoryOptions()
RequestDelegateFactoryTests.EndpointFilters.cs (2)
34RequestDelegateFactoryOptions options = new() 78RequestDelegateFactoryOptions options = new()
RequestDelegateFactoryTests.FormMapping.cs (4)
22var options = new RequestDelegateFactoryOptions 69var options = new RequestDelegateFactoryOptions 116var options = new RequestDelegateFactoryOptions 241var options = new RequestDelegateFactoryOptions
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (1)
328}, new RequestDelegateFactoryOptions() { ThrowOnBadRequest = shouldThrow });
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
EndpointMetadataApiDescriptionProviderTest.cs (1)
1547var options = new RequestDelegateFactoryOptions { ServiceProvider = serviceProvider, DisableInferBodyFromParameters = shouldDisableInferredBodyForMethod };
Microsoft.AspNetCore.Routing (1)
RouteEndpointDataSource.cs (1)
274return new()
62 references to RequestDelegateFactoryOptions
Microsoft.AspNetCore.Http.Extensions (27)
RequestDelegateFactory.cs (22)
133/// Returns metadata inferred automatically for the <see cref="RequestDelegate"/> created by <see cref="Create(Delegate, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult?)"/>. 136/// <param name="methodInfo">The <see cref="MethodInfo"/> for the route handler to be passed to <see cref="Create(Delegate, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult?)"/>.</param> 137/// <param name="options">The options that will be used when calling <see cref="Create(Delegate, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult?)"/>.</param> 138/// <returns>The <see cref="RequestDelegateMetadataResult"/> to be passed to <see cref="Create(Delegate, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult?)"/>.</returns> 139public static RequestDelegateMetadataResult InferMetadata(MethodInfo methodInfo, RequestDelegateFactoryOptions? options = null) 155/// <param name="options">The <see cref="RequestDelegateFactoryOptions"/> used to configure the behavior of the handler.</param> 157public static RequestDelegateResult Create(Delegate handler, RequestDelegateFactoryOptions? options) 166/// <param name="options">The <see cref="RequestDelegateFactoryOptions"/> used to configure the behavior of the handler.</param> 168/// The result returned from <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> if that was used to inferring metadata before creating the final RequestDelegate. 169/// If <see langword="null"/>, this call to <see cref="Create(Delegate, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult?)"/> method will infer the metadata that 170/// <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> would have inferred for the same <see cref="Delegate.Method"/> and populate <see cref="RequestDelegateFactoryOptions.EndpointBuilder"/> 175public static RequestDelegateResult Create(Delegate handler, RequestDelegateFactoryOptions? options = null, RequestDelegateMetadataResult? metadataResult = null) 206/// <param name="options">The <see cref="RequestDelegateFactoryOptions"/> used to configure the behavior of the handler.</param> 208public static RequestDelegateResult Create(MethodInfo methodInfo, Func<HttpContext, object>? targetFactory, RequestDelegateFactoryOptions? options) 218/// <param name="options">The <see cref="RequestDelegateFactoryOptions"/> used to configure the behavior of the handler.</param> 220/// The result returned from <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> if that was used to inferring metadata before creating the final RequestDelegate. 221/// If <see langword="null"/>, this call to <see cref="Create(Delegate, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult?)"/> method will infer the metadata that 222/// <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> would have inferred for the same <see cref="Delegate.Method"/> and populate <see cref="RequestDelegateFactoryOptions.EndpointBuilder"/> 227public static RequestDelegateResult Create(MethodInfo methodInfo, Func<HttpContext, object>? targetFactory = null, RequestDelegateFactoryOptions? options = null, RequestDelegateMetadataResult? metadataResult = null) 264private static RequestDelegateFactoryContext CreateFactoryContext(RequestDelegateFactoryOptions? options, RequestDelegateMetadataResult? metadataResult = null, Delegate? handler = null)
RequestDelegateFactoryOptions.cs (2)
39/// The <see cref="EndpointBuilder.RequestDelegate"/> must be <see langword="null"/>. After the call to <see cref="RequestDelegateFactory.Create(Delegate, RequestDelegateFactoryOptions?)"/>, 46/// <see cref="IAcceptsMetadata"/> that <see cref="RequestDelegateFactory.Create(Delegate, RequestDelegateFactoryOptions?)"/> infers automatically
RequestDelegateMetadataResult.cs (3)
7/// The metadata inferred by <see cref="RequestDelegateFactory.InferMetadata(System.Reflection.MethodInfo, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions?)"/>. 8/// <see cref="RequestDelegateFactoryOptions.EndpointBuilder"/> will be automatically populated with this metadata if provided. 9/// If this is passed to <see cref="RequestDelegateFactory.Create(Delegate, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions?, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult?)"/>,
Microsoft.AspNetCore.Http.Extensions.Tests (22)
RequestDelegateFactoryTests.cs (16)
1746RequestDelegateFactoryOptions options = new() { ServiceProvider = services }; 2560var options = new RequestDelegateFactoryOptions { EndpointBuilder = CreateEndpointBuilder(new List<object> { customMetadata }) }; 2673var options = new RequestDelegateFactoryOptions 2695var options = new RequestDelegateFactoryOptions 2718var options = new RequestDelegateFactoryOptions 2741var options = new RequestDelegateFactoryOptions 2764var options = new RequestDelegateFactoryOptions 2785var options = new RequestDelegateFactoryOptions 2806var options = new RequestDelegateFactoryOptions 2843var options = new RequestDelegateFactoryOptions 2867var options = new RequestDelegateFactoryOptions 2901var options = new RequestDelegateFactoryOptions 2922var options = new RequestDelegateFactoryOptions 3004var options = new RequestDelegateFactoryOptions(); 3049RequestDelegateFactoryOptions options = new() 3076RequestDelegateFactoryOptions options = new()
RequestDelegateFactoryTests.EndpointFilters.cs (2)
34RequestDelegateFactoryOptions options = new() 78RequestDelegateFactoryOptions options = new()
RequestDelegateFactoryTests.FormMapping.cs (4)
22var options = new RequestDelegateFactoryOptions 69var options = new RequestDelegateFactoryOptions 116var options = new RequestDelegateFactoryOptions 241var options = new RequestDelegateFactoryOptions
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
EndpointMetadataApiDescriptionProviderTest.cs (2)
1547var options = new RequestDelegateFactoryOptions { ServiceProvider = serviceProvider, DisableInferBodyFromParameters = shouldDisableInferredBodyForMethod }; 1575private static ApiDescription GetApiDescription(Delegate action, string? pattern = null, string? displayName = null, IEnumerable<string>? httpMethods = null, RequestDelegateFactoryOptions? options = null) =>
Microsoft.AspNetCore.Routing (11)
Builder\EndpointRouteBuilderExtensions.cs (1)
203static RequestDelegateResult CreateHandlerRequestDelegate(Delegate handler, RequestDelegateFactoryOptions options, RequestDelegateMetadataResult? metadataResult)
Builder\RouteHandlerServices.cs (4)
38Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult> populateMetadata, 39Func<Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult?, RequestDelegateResult> createRequestDelegate) 68Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult> populateMetadata, 69Func<Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult?, RequestDelegateResult> createRequestDelegate,
RequestDelegateFilterPipelineBuilder.cs (1)
17public static RequestDelegate Create(RequestDelegate requestDelegate, RequestDelegateFactoryOptions options)
RouteEndpointDataSource.cs (5)
31Func<Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult?, RequestDelegateResult> createHandlerRequestDelegateFunc, 58Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult>? inferMetadataFunc, 59Func<Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult?, RequestDelegateResult> createHandlerRequestDelegateFunc, 204RequestDelegateFactoryOptions? rdfOptions = null; 272private RequestDelegateFactoryOptions CreateRdfOptions(RouteEntry entry, RoutePattern pattern, RouteEndpointBuilder builder)