31 references to EmitHandlerArgument
Microsoft.AspNetCore.Http.RequestDelegateGenerator (31)
StaticRouteHandlerModel\Emitters\EmitterExtensions.cs (7)
40
EndpointParameterSource.JsonBody or EndpointParameterSource.Route or EndpointParameterSource.RouteOrQuery or EndpointParameterSource.JsonBodyOrService or EndpointParameterSource.FormBody => endpointParameter.IsOptional ? endpointParameter.
EmitHandlerArgument
() : $"{endpointParameter.
EmitHandlerArgument
()}!",
44
endpointParameter.
EmitHandlerArgument
() :
46
? $"{endpointParameter.
EmitHandlerArgument
()}.HasValue ? {endpointParameter.
EmitHandlerArgument
()}.Value : default"
47
: $"{endpointParameter.
EmitHandlerArgument
()}",
49
_ => endpointParameter.
EmitHandlerArgument
()
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (22)
15
=> codeWriter.WriteLine($"var {endpointParameter.
EmitHandlerArgument
()} = {endpointParameter.AssigningCode};");
98
codeWriter.WriteLine($"{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)} {endpointParameter.
EmitHandlerArgument
()} = {createArray};");
117
codeWriter.WriteLine($"{endpointParameter.
EmitHandlerArgument
()}[i] = string.IsNullOrEmpty(element) ? null! : parsed_element!;");
121
codeWriter.WriteLine($"{endpointParameter.
EmitHandlerArgument
()}[i] = parsed_element!;");
128
codeWriter.WriteLine($"{endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)} {endpointParameter.
EmitHandlerArgument
()} = {endpointParameter.EmitTempArgument()}!;");
167
codeWriter.WriteLine($"{endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)} {endpointParameter.
EmitHandlerArgument
()} = {endpointParameter.EmitParsedTempArgument()}!;");
172
codeWriter.WriteLine($"{endpointParameter.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)} {endpointParameter.
EmitHandlerArgument
()} = {endpointParameter.EmitTempArgument()}!;");
259
codeWriter.WriteLine($"var {endpointParameter.
EmitHandlerArgument
()} = {resolveBodyResult}.Item2;");
293
? $"var {endpointParameter.
EmitHandlerArgument
()} = {resolveJsonBodyOrServiceResult}.Item2!;"
294
: $"var {endpointParameter.
EmitHandlerArgument
()} = {resolveJsonBodyOrServiceResult}.Item2;");
304
codeWriter.WriteLine($"{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)} {endpointParameter.
EmitHandlerArgument
()} = null!;");
308
codeWriter.WriteLine($"""{endpointParameter.
EmitHandlerArgument
()} = {endpointParameter.EmitAssigningCodeResult()}!;""");
321
codeWriter.WriteLine($"{endpointParameter.
EmitHandlerArgument
()} = {resolveBodyResult}.Item2!;");
353
codeWriter.WriteLine($"var {endpointParameter.
EmitHandlerArgument
()} = await BindAsync<{unwrappedTypeString}>(httpContext, {resolveParameterInfo});");
356
codeWriter.WriteLine($"var {endpointParameter.
EmitHandlerArgument
()} = await {bindMethodReceiverTypeString}.BindAsync(httpContext, {resolveParameterInfo});");
359
codeWriter.WriteLine($"var {endpointParameter.
EmitHandlerArgument
()} = await {bindMethodReceiverTypeString}.BindAsync(httpContext);");
373
? $"if (!{endpointParameter.
EmitHandlerArgument
()}.HasValue)"
374
: $"if ({endpointParameter.
EmitHandlerArgument
()} == null)");
378
codeWriter.WriteLine($"{endpointParameter.
EmitHandlerArgument
()} = default!;");
394
codeWriter.WriteLine($"var {endpointParameter.
EmitHandlerArgument
()} = {assigningCode};");
409
codeWriter.WriteLine($"var {endpointParameter.
EmitHandlerArgument
()} = {assigningCode};");
416
codeWriter.WriteLine($"var {endpointParameter.
EmitHandlerArgument
()} = {endpointParameter.AssigningCode};");
StaticRouteHandlerModel\EndpointParameter.cs (2)
182
var parameterList = string.Join(", ", EndpointParameters.Select(p => $"{p.SymbolName} = {p.
EmitHandlerArgument
()}"));
187
var parameterList = string.Join(", ", EndpointParameters.Select(p => p.
EmitHandlerArgument
()));