-
Notifications
You must be signed in to change notification settings - Fork 173
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
chore(csharp): Misc improvements #5838
Conversation
- Call `.ConfigureAwait(false)` on Tasks - Use Enumerable<T>.Empty instead of creating a new empty list - Add PolySharp to test project and use C# 12 - Improve C# syntax - Remove redundant `#nullable enable` directives
…ern-api/fern into niels/csharp/misc-improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great, but a couple test definitions might need some attention (e.g. pagination
).
"enum_property": "{{KnownEnumValue2String}}" | ||
} | ||
"""; | ||
private const string JsonWithKnownEnum2 = $$""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this string format preferred? I would have thought the previous nesting was better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be csharpier, the source template doesn't format it like this
I think test definitions changed which is uncovering some bugs in the C# generator. |
Description
Miscellaneous improvement for the C# generator
.ConfigureAwait(false)
on TasksEnumerable<T>.Empty
instead of creating a new empty list#nullable enable
directivesSystemTask
alias forSystem.Threading.Tasks.Task
to avoid conflict with potentially namedTask
resourcesTesting