Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed CsvOutputFormatter bug where a return type was not IEnumerable<T> but is … #204

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

preeder
Copy link

@preeder preeder commented Apr 7, 2020

Fixed bug where a return type which implements IEnumerable but is not itself generic (or perhaps not [generic]) would fail when UseSingleLineHeaderInCsv was true.

This happened to me in .NET Core 3.1 using the pretty simple controller method:
[HttpGet]
[Produces("text/csv")]
public IEnumerable Get(string id)

Perhaps this was caused by how "yield return" is handled by the compiler. I would have looked into that further, except that it was a flaw and fixing the flaw is more important.

…not itself generic (or perhaps not [generic]<T>) would fail when UseSingleLineHeaderInCsv was true.
damienbod
damienbod previously approved these changes Apr 10, 2020
@damienbod
Copy link
Member

@preeder Just want to test and validate this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants