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