1 write to Response
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\Endpoint.cs (1)
35
Response
= new EndpointResponse(method, wellKnownTypes);
36 references to Response
Microsoft.AspNetCore.Http.RequestDelegateGenerator (36)
RequestDelegateGenerator.cs (3)
111
codeWriter.WriteLine(endpoint.
Response
?.IsAwaitable == true
117
codeWriter.WriteLine(endpoint.
Response
?.IsAwaitable == true
183
var hasIResult = endpoints.Any(endpoint => endpoint.
Response
?.IsIResult == true);
StaticRouteHandlerModel\Emitters\EndpointJsonPreparationEmitter.cs (1)
16
if (endpoint.
Response
?.IsSerializableJsonResponse(out var responseType) == true)
StaticRouteHandlerModel\Endpoint.cs (7)
36
Response
.EmitRequiredDiagnostics(Diagnostics, Operation.Syntax.GetLocation());
37
IsAwaitable =
Response
?.IsAwaitable == true;
39
EmitterContext.HasResponseMetadata =
Response
is { } response && !(response.IsIResult || response.HasNoResponse);
45
EmitterContext.HasEndpointMetadataProvider =
Response
!.IsEndpointMetadataProvider;
118
if (!string.Equals(a.
Response
?.WrappedResponseTypeDisplayName, b.
Response
?.WrappedResponseTypeDisplayName, StringComparison.Ordinal) ||
139
hashCode.Add(endpoint.
Response
?.WrappedResponseTypeDisplayName);
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (25)
26
return endpoint.
Response
== null || (endpoint.
Response
.HasNoResponse && !endpoint.
Response
.IsAwaitable) ? "void ()" : $"{endpoint.
Response
.WrappedResponseTypeDisplayName} ()";
30
if (endpoint.
Response
== null || (endpoint.
Response
.HasNoResponse && !endpoint.
Response
.IsAwaitable))
34
return $"{endpoint.
Response
.WrappedResponseTypeDisplayName} ({parameterTypeList})";
84
if (endpoint.
Response
== null)
88
if (endpoint.
Response
.IsAwaitable)
92
if (endpoint.
Response
.IsAwaitable && endpoint.
Response
.WrappedResponseType.NullableAnnotation == NullableAnnotation.Annotated)
99
if (!endpoint.
Response
.HasNoResponse)
103
codeWriter.WriteLine(endpoint.
Response
.IsAwaitable ? "await task;" : $"handler({endpoint.EmitArgumentList()});");
105
endpoint.
Response
.EmitHttpResponseContentType(codeWriter);
107
if (!endpoint.
Response
.HasNoResponse)
109
endpoint.
Response
.EmitResponseWritingCall(codeWriter, endpoint.IsAwaitable);
203
if (endpoint.
Response
is not { } response)
208
if (!endpoint.
Response
.IsAwaitable && (response.HasNoResponse || response.IsIResult))
230
if (endpoint.
Response
is not { } response || response.ResponseType is not { } responseType)
413
if (endpoint.
Response
?.HasNoResponse == true)
415
codeWriter.WriteLine(endpoint.
Response
?.IsAwaitable == true
418
codeWriter.WriteLine(endpoint.
Response
?.IsAwaitable == true
422
else if (endpoint.
Response
?.IsAwaitable == true)
425
if (endpoint.
Response
?.WrappedResponseType.NullableAnnotation == NullableAnnotation.Annotated)