69 references to EndpointParameterSource
Microsoft.AspNetCore.Http.RequestDelegateGenerator (69)
StaticRouteHandlerModel\Emitters\EmitterExtensions.cs (13)
14
EndpointParameterSource
.Header => "header",
15
EndpointParameterSource
.Query => "query string",
16
EndpointParameterSource
.Route => "route",
17
EndpointParameterSource
.RouteOrQuery => "route or query string",
18
EndpointParameterSource
.FormBody => "form",
19
EndpointParameterSource
.BindAsync => endpointParameter.BindMethod == BindabilityMethod.BindAsync
40
EndpointParameterSource
.JsonBody or
EndpointParameterSource
.Route or
EndpointParameterSource
.RouteOrQuery or
EndpointParameterSource
.JsonBodyOrService or
EndpointParameterSource
.FormBody => endpointParameter.IsOptional ? endpointParameter.EmitHandlerArgument() : $"{endpointParameter.EmitHandlerArgument()}!",
43
EndpointParameterSource
.BindAsync => endpointParameter.IsOptional ?
48
EndpointParameterSource
.Unknown => throw new NotImplementedException("Unreachable!"),
StaticRouteHandlerModel\Emitters\EndpointEmitter.cs (17)
24
case
EndpointParameterSource
.SpecialType:
27
case
EndpointParameterSource
.Query:
28
case
EndpointParameterSource
.Header:
31
case
EndpointParameterSource
.Route:
34
case
EndpointParameterSource
.RouteOrQuery:
38
case
EndpointParameterSource
.BindAsync:
42
case
EndpointParameterSource
.JsonBody:
45
case
EndpointParameterSource
.FormBody:
48
case
EndpointParameterSource
.JsonBodyOrService:
51
case
EndpointParameterSource
.JsonBodyOrQuery:
54
case
EndpointParameterSource
.Service:
57
case
EndpointParameterSource
.KeyedService:
60
case
EndpointParameterSource
.AsParameters:
74
if (parameter is { Source:
EndpointParameterSource
.AsParameters, EndpointParameters: {} innerParameters })
85
if (parameter.Source ==
EndpointParameterSource
.RouteOrQuery)
101
if (parameter is { Source:
EndpointParameterSource
.AsParameters, EndpointParameters: {} innerParameters })
112
if (parameter.Source ==
EndpointParameterSource
.JsonBodyOrService)
StaticRouteHandlerModel\Emitters\EndpointJsonPreparationEmitter.cs (2)
25
if (parameter is { Source:
EndpointParameterSource
.AsParameters, EndpointParameters: {} innerParameters })
36
if (parameter.Source !=
EndpointParameterSource
.JsonBody)
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (1)
21
var assigningCode = endpointParameter.Source is
EndpointParameterSource
.Header
StaticRouteHandlerModel\Endpoint.cs (4)
67
case
EndpointParameterSource
.BindAsync:
76
case
EndpointParameterSource
.Unknown:
91
parameter.Source ==
EndpointParameterSource
.SpecialType ||
92
parameter is { IsArray: true, ElementType.SpecialType: SpecialType.System_String, Source:
EndpointParameterSource
.Query });
StaticRouteHandlerModel\EndpointParameter.cs (26)
58
Source =
EndpointParameterSource
.Unknown;
71
Source =
EndpointParameterSource
.Route;
78
Source =
EndpointParameterSource
.Query;
85
Source =
EndpointParameterSource
.Header;
93
Source =
EndpointParameterSource
.FormBody;
131
Source =
EndpointParameterSource
.SpecialType;
136
Source =
EndpointParameterSource
.SpecialType;
142
Source =
EndpointParameterSource
.JsonBody;
148
Source =
EndpointParameterSource
.Service;
157
Source =
EndpointParameterSource
.KeyedService;
163
Source =
EndpointParameterSource
.AsParameters;
193
Source =
EndpointParameterSource
.SpecialType;
199
Source =
EndpointParameterSource
.FormBody;
206
Source =
EndpointParameterSource
.FormBody;
213
Source =
EndpointParameterSource
.FormBody;
221
Source =
EndpointParameterSource
.BindAsync;
227
Source =
EndpointParameterSource
.RouteOrQuery;
232
Source =
EndpointParameterSource
.JsonBodyOrQuery;
236
Source =
EndpointParameterSource
.Query;
241
Source =
EndpointParameterSource
.RouteOrQuery;
248
Source =
EndpointParameterSource
.JsonBodyOrService;
253
endpoint.EmitterContext.HasFormBody |= Source ==
EndpointParameterSource
.FormBody;
254
endpoint.EmitterContext.HasJsonBody |= Source ==
EndpointParameterSource
.JsonBody;
255
endpoint.EmitterContext.HasJsonBodyOrService |= Source ==
EndpointParameterSource
.JsonBodyOrService;
256
endpoint.EmitterContext.HasJsonBodyOrQuery |= Source ==
EndpointParameterSource
.JsonBodyOrQuery;
285
public
EndpointParameterSource
Source { get; set; }
StaticRouteHandlerModel\Model\EndpointParameterExtensions.cs (1)
18
return parameter.Source ==
EndpointParameterSource
.BindAsync ? handlerParameterType.UnwrapTypeSymbol(unwrapNullable: true) : handlerParameterType;
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (5)
249
if (parameter is { Source:
EndpointParameterSource
.AsParameters, EndpointParameters: { } innerParameters })
307
if (explicitBodyParameter == null && parameter.Source ==
EndpointParameterSource
.JsonBody)
312
else if (parameter.Source ==
EndpointParameterSource
.JsonBodyOrService || parameter.Source ==
EndpointParameterSource
.JsonBodyOrQuery)
396
var hasBindAsync = parameter.Source ==
EndpointParameterSource
.BindAsync ? "true" : "false";