You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 from Task<T> to ValueTask<T>. However the output of MVC is serializing ValueTask<T> instead of T
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 from
Task<T>toValueTask<T>. However the output of MVC is serializingValueTask<T>instead ofTThe 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 } }