40 instantiations of RequestDelegateFactoryOptions
Microsoft.AspNetCore.Http.Extensions.Tests (39)
RequestDelegateFactoryTests.cs (34)
106
var factoryResult = RequestDelegateFactory.Create(@delegate, new
RequestDelegateFactoryOptions
()
249
new
() { RouteParameterNames = null });
291
RequestDelegateFactory.Create(([FromRoute] int id) => { },
new
() { RouteParameterNames = Array.Empty<string>() }));
614
var factoryResult = RequestDelegateFactory.Create(StoreNullableIntArray,
new
() { DisableInferBodyFromParameters = true });
758
var factoryResult = RequestDelegateFactory.Create(StoreNullableIntArray,
new
() { ThrowOnBadRequest = true, DisableInferBodyFromParameters = true });
872
var factoryResult = RequestDelegateFactory.Create(action, new
RequestDelegateFactoryOptions
() { ServiceProvider = mock.Object });
1184
var factoryResult = RequestDelegateFactory.Create(action, options:
new
() { ServiceProvider = services });
1412
Assert.Throws<NotSupportedException>(() => RequestDelegateFactory.Create(TestAction,
new
() { ServiceProvider = httpContext.RequestServices }));
1567
var factoryResult = RequestDelegateFactory.Create(@delegate,
new
()
1746
RequestDelegateFactoryOptions options =
new
() { ServiceProvider = services };
2166
var factoryResult = RequestDelegateFactory.Create(methodInfo!, null, new
RequestDelegateFactoryOptions
()
2209
var factoryResult = RequestDelegateFactory.Create(methodInfo!, targetFactory, new
RequestDelegateFactoryOptions
()
2281
var factoryResult = RequestDelegateFactory.Create(@delegate, new
RequestDelegateFactoryOptions
()
2376
var factoryResult = RequestDelegateFactory.Create(@delegate, new
RequestDelegateFactoryOptions
()
2410
var factoryResult = RequestDelegateFactory.Create(HandlerWithTaskAwait, new
RequestDelegateFactoryOptions
()
2495
var factoryResult = RequestDelegateFactory.Create(@delegate, new
RequestDelegateFactoryOptions
()
2560
var options = new
RequestDelegateFactoryOptions
{ EndpointBuilder = CreateEndpointBuilder(new List<object> { customMetadata }) };
2672
var options = new
RequestDelegateFactoryOptions
2694
var options = new
RequestDelegateFactoryOptions
2716
var options = new
RequestDelegateFactoryOptions
2738
var options = new
RequestDelegateFactoryOptions
2760
var options = new
RequestDelegateFactoryOptions
2781
var options = new
RequestDelegateFactoryOptions
2802
var options = new
RequestDelegateFactoryOptions
2837
var options = new
RequestDelegateFactoryOptions
2861
var options = new
RequestDelegateFactoryOptions
2895
var options = new
RequestDelegateFactoryOptions
2916
var options = new
RequestDelegateFactoryOptions
2998
var options = new
RequestDelegateFactoryOptions
();
3016
var result = RequestDelegateFactory.Create(@delegate,
new
() { ServiceProvider = serviceProvider });
3031
var result = RequestDelegateFactory.Create(@delegate,
new
() { ServiceProvider = serviceProvider });
3043
RequestDelegateFactoryOptions options =
new
()
3070
RequestDelegateFactoryOptions options =
new
()
3086
var result = RequestDelegateFactory.Create(@delegate, new
RequestDelegateFactoryOptions
()
RequestDelegateFactoryTests.FormMapping.cs (4)
22
var options = new
RequestDelegateFactoryOptions
69
var options = new
RequestDelegateFactoryOptions
116
var options = new
RequestDelegateFactoryOptions
241
var options = new
RequestDelegateFactoryOptions
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (1)
328
}, new
RequestDelegateFactoryOptions
() { ThrowOnBadRequest = shouldThrow });
Microsoft.AspNetCore.Routing (1)
RouteEndpointDataSource.cs (1)
274
return
new
()
58 references to RequestDelegateFactoryOptions
Microsoft.AspNetCore.Http.Extensions (27)
RequestDelegateFactory.cs (22)
135
/// Returns metadata inferred automatically for the <see cref="RequestDelegate"/> created by <see cref="Create(Delegate,
RequestDelegateFactoryOptions
?, RequestDelegateMetadataResult?)"/>.
138
/// <param name="methodInfo">The <see cref="MethodInfo"/> for the route handler to be passed to <see cref="Create(Delegate,
RequestDelegateFactoryOptions
?, RequestDelegateMetadataResult?)"/>.</param>
139
/// <param name="options">The options that will be used when calling <see cref="Create(Delegate,
RequestDelegateFactoryOptions
?, RequestDelegateMetadataResult?)"/>.</param>
140
/// <returns>The <see cref="RequestDelegateMetadataResult"/> to be passed to <see cref="Create(Delegate,
RequestDelegateFactoryOptions
?, RequestDelegateMetadataResult?)"/>.</returns>
141
public static RequestDelegateMetadataResult InferMetadata(MethodInfo methodInfo,
RequestDelegateFactoryOptions
? options = null)
157
/// <param name="options">The <see cref="
RequestDelegateFactoryOptions
"/> used to configure the behavior of the handler.</param>
159
public static RequestDelegateResult Create(Delegate handler,
RequestDelegateFactoryOptions
? options)
168
/// <param name="options">The <see cref="
RequestDelegateFactoryOptions
"/> used to configure the behavior of the handler.</param>
170
/// The result returned from <see cref="InferMetadata(MethodInfo,
RequestDelegateFactoryOptions
?)"/> if that was used to inferring metadata before creating the final RequestDelegate.
171
/// If <see langword="null"/>, this call to <see cref="Create(Delegate,
RequestDelegateFactoryOptions
?, RequestDelegateMetadataResult?)"/> method will infer the metadata that
172
/// <see cref="InferMetadata(MethodInfo,
RequestDelegateFactoryOptions
?)"/> would have inferred for the same <see cref="Delegate.Method"/> and populate <see cref="
RequestDelegateFactoryOptions
.EndpointBuilder"/>
177
public static RequestDelegateResult Create(Delegate handler,
RequestDelegateFactoryOptions
? options = null, RequestDelegateMetadataResult? metadataResult = null)
208
/// <param name="options">The <see cref="
RequestDelegateFactoryOptions
"/> used to configure the behavior of the handler.</param>
210
public static RequestDelegateResult Create(MethodInfo methodInfo, Func<HttpContext, object>? targetFactory,
RequestDelegateFactoryOptions
? options)
220
/// <param name="options">The <see cref="
RequestDelegateFactoryOptions
"/> used to configure the behavior of the handler.</param>
222
/// The result returned from <see cref="InferMetadata(MethodInfo,
RequestDelegateFactoryOptions
?)"/> if that was used to inferring metadata before creating the final RequestDelegate.
223
/// If <see langword="null"/>, this call to <see cref="Create(Delegate,
RequestDelegateFactoryOptions
?, RequestDelegateMetadataResult?)"/> method will infer the metadata that
224
/// <see cref="InferMetadata(MethodInfo,
RequestDelegateFactoryOptions
?)"/> would have inferred for the same <see cref="Delegate.Method"/> and populate <see cref="
RequestDelegateFactoryOptions
.EndpointBuilder"/>
229
public static RequestDelegateResult Create(MethodInfo methodInfo, Func<HttpContext, object>? targetFactory = null,
RequestDelegateFactoryOptions
? options = null, RequestDelegateMetadataResult? metadataResult = null)
266
private 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 (20)
RequestDelegateFactoryTests.cs (16)
1746
RequestDelegateFactoryOptions
options = new() { ServiceProvider = services };
2560
var
options = new RequestDelegateFactoryOptions { EndpointBuilder = CreateEndpointBuilder(new List<object> { customMetadata }) };
2672
var
options = new RequestDelegateFactoryOptions
2694
var
options = new RequestDelegateFactoryOptions
2716
var
options = new RequestDelegateFactoryOptions
2738
var
options = new RequestDelegateFactoryOptions
2760
var
options = new RequestDelegateFactoryOptions
2781
var
options = new RequestDelegateFactoryOptions
2802
var
options = new RequestDelegateFactoryOptions
2837
var
options = new RequestDelegateFactoryOptions
2861
var
options = new RequestDelegateFactoryOptions
2895
var
options = new RequestDelegateFactoryOptions
2916
var
options = new RequestDelegateFactoryOptions
2998
var
options = new RequestDelegateFactoryOptions();
3043
RequestDelegateFactoryOptions
options = new()
3070
RequestDelegateFactoryOptions
options = new()
RequestDelegateFactoryTests.FormMapping.cs (4)
22
var
options = new RequestDelegateFactoryOptions
69
var
options = new RequestDelegateFactoryOptions
116
var
options = new RequestDelegateFactoryOptions
241
var
options = new RequestDelegateFactoryOptions
Microsoft.AspNetCore.Routing (11)
Builder\EndpointRouteBuilderExtensions.cs (1)
203
static RequestDelegateResult CreateHandlerRequestDelegate(Delegate handler,
RequestDelegateFactoryOptions
options, RequestDelegateMetadataResult? metadataResult)
Builder\RouteHandlerServices.cs (4)
38
Func<MethodInfo,
RequestDelegateFactoryOptions
?, RequestDelegateMetadataResult> populateMetadata,
39
Func<Delegate,
RequestDelegateFactoryOptions
, RequestDelegateMetadataResult?, RequestDelegateResult> createRequestDelegate)
68
Func<MethodInfo,
RequestDelegateFactoryOptions
?, RequestDelegateMetadataResult> populateMetadata,
69
Func<Delegate,
RequestDelegateFactoryOptions
, RequestDelegateMetadataResult?, RequestDelegateResult> createRequestDelegate,
RequestDelegateFilterPipelineBuilder.cs (1)
17
public static RequestDelegate Create(RequestDelegate requestDelegate,
RequestDelegateFactoryOptions
options)
RouteEndpointDataSource.cs (5)
31
Func<Delegate,
RequestDelegateFactoryOptions
, RequestDelegateMetadataResult?, RequestDelegateResult> createHandlerRequestDelegateFunc,
58
Func<MethodInfo,
RequestDelegateFactoryOptions
?, RequestDelegateMetadataResult>? inferMetadataFunc,
59
Func<Delegate,
RequestDelegateFactoryOptions
, RequestDelegateMetadataResult?, RequestDelegateResult> createHandlerRequestDelegateFunc,
204
RequestDelegateFactoryOptions
? rdfOptions = null;
272
private
RequestDelegateFactoryOptions
CreateRdfOptions(RouteEntry entry, RoutePattern pattern, RouteEndpointBuilder builder)