1 write to IsAwaitable
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\EndpointResponse.cs (1)
33
IsAwaitable
= isAwaitable;
22 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 (15)
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 (9)
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)
414
codeWriter.WriteLine(endpoint.Response?.
IsAwaitable
== true
417
codeWriter.WriteLine(endpoint.Response?.
IsAwaitable
== true
421
else if (endpoint.Response?.
IsAwaitable
== true)