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
Use C# 12 features #806
Use C# 12 features #806
Conversation
martincostello
commented
Oct 1, 2023
- Use primary constructors where relevant.
- Use collection literals where relevant.
- Add helper method to reduce duplicative tests.
- Apply some IDE suggestions.
- Remove redundant using statements.
- Fix some typos.
- Hide shared files from the Visual Studio project explorer.
- Use primary constructors in test classes. - Use collection literals - Add helper method to reduce duplicative tests. - Fix some typos.
Update test missed from refactor in previous commit.
Hide shared files from the Visual Studio project explorer.
- Use primary constructors where relevant. - Use collection literals where relevant. - Apply some IDE suggestions. - Remove redundant using statements. - Fix some typos.
Remove `<remarks>` from class documentation when primary constructor is used.
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.
👍🏻
{ | ||
new AuthenticationToken() { Name = "access_token", Value = tokens.AccessToken }, | ||
}; | ||
List<AuthenticationToken> authTokens = |
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.
Assuming we like the new syntax mostly for its terseness, maybe we should put everything on the same line when there's a single item added?
List<AuthenticationToken> authTokens = [new() { Name = "access_token", Value = tokens.AccessToken }];
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.
I'm not going to change this one, at least for now, as doing so needs me to suppress SA1010 due to this bug.
src/AspNet.Security.OAuth.Apple/Internal/DefaultAppleClientSecretGenerator.cs
Outdated
Show resolved
Hide resolved
Code reviewer prefers the older style.
Remove property and use constructor parameter to match `hostingEnvironment`.