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

Use C# 12 features #6070

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

Conversation

keyboardDrummer
Copy link
Member

What was changed?

  • Use the collection expression feature where possible
  • Use the primary constructor feature where possible

How has this been tested?

No additional tests needed, since this is a pure refactoring

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@keyboardDrummer keyboardDrummer enabled auto-merge (squash) January 23, 2025 15:22
Copy link
Contributor

@ssomayyajula ssomayyajula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really like the primary constructors! But isn't it technically less safe when you convert a readonly field to a primary constructor parameter, since they're always writeable?

@keyboardDrummer
Copy link
Member Author

Really like the primary constructors! But isn't it technically less safe when you convert a readonly field to a primary constructor parameter, since they're always writeable?

Good point. You can make them readonly by prefixing them with in but that has not been done in this refactoring :/

@keyboardDrummer
Copy link
Member Author

Really like the primary constructors! But isn't it technically less safe when you convert a readonly field to a primary constructor parameter, since they're always writeable?

I've removed that commit now, and did a few manual applications of primary constructors.

@keyboardDrummer keyboardDrummer requested review from ssomayyajula and removed request for MikaelMayer January 24, 2025 10:10
Copy link
Contributor

@ssomayyajula ssomayyajula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@ssomayyajula ssomayyajula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

2 participants