jeremydmiller on master
Better Disposal mechanics to ge… (compare)
jeremydmiller on master
Little rename and method access… Local routing improvements, new… (compare)
jeremydmiller on master
New Endpoint.ReplyUri() method New Endpoint.ReplyEndpoint() me… Little tweak to ReplyUri mechan… (compare)
UpdateFeatureSubscriptionsHandler
) has been working fine (not sure if it still is, but I assume it is)
runReportHandler
that I saw without the elided task lol
AsyncMode
setting on the GeneratedMethod
, but it also never seems to actually set that. So to make it "smarter" it would need to lean a little more on computing what the async mode should be.
ServiceScopeFactoryCreation
to set IsAsync
to true would solve the problem, even though that is technically not true.
SyncFrame
, which always sets it to false, but doesn't provide anything else, so I'm not sure if there's some significance to making it a SyncFrame
.
Ok, so my thought is to add a new property to Frame
: RequiresAwait
, and then modify the MethodFrameArranger.Arange()
as:
public void Arrange(out AsyncMode asyncMode, out Frame topFrame)
{
var compiled = compileFrames(_method.Frames);
asyncMode = AsyncMode.AsyncTask;
if(compiled.Any(x => x.IsAsync) && compiled.Any(x => x.RequiresAwait))
{
asyncMode = AsyncMode.AsyncTask;
}
else if (compiled.All(x => !x.IsAsync))
{
asyncMode = AsyncMode.None;
}
else if (compiled.Count(x => x.IsAsync) == 1 && compiled.Last().IsAsync && compiled.Last().CanReturnTask())
{
asyncMode = compiled.Any(x => x.Wraps) ? AsyncMode.AsyncTask : AsyncMode.ReturnFromLastNode;
}
topFrame = chainFrames(compiled);
}
Thoughts?