This repository was archived by the owner on Dec 14, 2018. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork2.1k
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
ValueTask<T> response body is serializing ValueTask instead of T #6040
Closed
Description
I recently upgraded a CoreCLR 1.1 codebase to C# 7.0 and tried to change the output of async controllers to diminish allocation pressure fromTask<T> toValueTask<T>. However the output of MVC is serializingValueTask<T> instead ofT
The response was supposed to be:
[ {"code":"code","displayName":"Coding" }]But when changed to ValueTask it ends up being:
{"isCompleted":false,"isCompletedSuccessfully":false,"isFaulted":false,"isCanceled":false,"result": {"value": [ {"code":"code","displayName":"Coding" } ],"formatters": [],"contentTypes": [],"declaredType":null,"statusCode":200 }}