Version Used:
Microsoft Visual Studio Enterprise 2019 Int Preview
Version 16.1.0 Preview 3.0 [28823.117.d16.1]
VisualStudio.16.IntPreview/16.1.0-pre.3.0+28823.117.d16.1
Microsoft .NET Framework
Version 4.8.03752
Steps to Reproduce:
Expected Behavior:
Finding the following entries:
PascalCase
camelCase
Actual Behavior:
These entries:
Pascal Case
Camel Case
Will there be support for snake_case
?
Will there be support for
snake_case
?
I think this might violate good taste :-)
Alas kebab-case
isn't valid C#
Will there be support for
snake_case
?I think this might violate good taste :-)
To be honest lot of public APIs are using snake_case
in their JSON objects and it's much easier to maintain C# POCO in snake_case
for those APIs.
That's fair, although I'd rather configure a JSON.NET casing strategy than making my C# POCOs look weird.
Hypothetically, if you had that casing option, how would you configure the system thought? There are no namespace / attribute filters. Presumably, you don't want to apply this convention everywhere.
I was thinking that naming can be tied to particular project. Not sure though if it's possible at the moment.
Anyway I was able to create custom snake_case
:)
Alternative to the original suggestion, I think adding an example after the name would also work very well:
HttpClient
)”httpClient
)”This would probably be a bit more in line with the other option there.
The main dropdown called Capitalization
already has correct styling of its values. The issue is with the titles of default naming styles which come with Visual Studio installation.
Mentioning that drop down, it does appear a bit inconsistent that the first two options refer to the general style names (pascal case and camel case), while the lower three options are descriptions of what they do.
We could have the first two be “All words capitalized” and “All words except first capitalized” respectively to match with the others; although I do think that it is useful to keep the pascal/camel case in there somewhere (maybe in parentheses). Or we come up with names for the other three (the name for the third is actually “Title case”).
That being said, the third option should actually be ”First word capitalized” instead of “First word upper”, otherwise it should probably be HTTPclient
or SERVICEprovider
.
Most helpful comment
Alas
kebab-case
isn't valid C#