1 write to IsAwaitable
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\EndpointResponse.cs (1)
33
IsAwaitable
= isAwaitable;
24 references to IsAwaitable
Microsoft.AspNetCore.Http.Extensions.Tests (7)
RequestDelegateGenerator\CompileTimeCreationTests.cs (2)
590
Assert.False(endpointModel.Response.
IsAwaitable
);
609
Assert.True(endpointModel.Response.
IsAwaitable
);
RequestDelegateGenerator\RequestDelegateCreationTests.Responses.cs (5)
166
Assert.True(endpointModel.Response.
IsAwaitable
);
191
Assert.True(endpointModel.Response.
IsAwaitable
);
219
Assert.True(endpointModel.Response.
IsAwaitable
);
241
Assert.True(endpointModel.Response.
IsAwaitable
);
247
Assert.True(endpointModel.Response.
IsAwaitable
);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (17)
RequestDelegateGenerator.cs (2)
111
codeWriter.WriteLine(endpoint.Response?.
IsAwaitable
== true
117
codeWriter.WriteLine(endpoint.Response?.
IsAwaitable
== true
StaticRouteHandlerModel\Endpoint.cs (1)
37
IsAwaitable = Response?.
IsAwaitable
== true;
StaticRouteHandlerModel\EndpointResponse.cs (3)
107
otherEndpointResponse.
IsAwaitable
==
IsAwaitable
&&
114
HashCode.Combine(SymbolEqualityComparer.Default.GetHashCode(ResponseType), SymbolEqualityComparer.Default.GetHashCode(WrappedResponseType), WrappedResponseTypeDisplayName,
IsAwaitable
, HasNoResponse, IsIResult, ContentType);
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (11)
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
))
88
if (endpoint.Response.
IsAwaitable
)
92
if (endpoint.Response.
IsAwaitable
&& endpoint.Response.WrappedResponseType.NullableAnnotation == NullableAnnotation.Annotated)
103
codeWriter.WriteLine(endpoint.Response.
IsAwaitable
? "await task;" : $"handler({endpoint.EmitArgumentList()});");
160
else if (!endpointResponse.
IsAwaitable
&& endpointResponse.HasNoResponse)
208
if (!endpoint.Response.
IsAwaitable
&& (response.HasNoResponse || response.IsIResult))
218
else if (response.
IsAwaitable
&& response.ResponseType == null)
415
codeWriter.WriteLine(endpoint.Response?.
IsAwaitable
== true
418
codeWriter.WriteLine(endpoint.Response?.
IsAwaitable
== true
422
else if (endpoint.Response?.
IsAwaitable
== true)