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 Guard for null checks #4585

Closed

Conversation

SimonCropp
Copy link
Contributor

No description provided.

@SimonCropp SimonCropp marked this pull request as draft March 8, 2025 12:57
@StefanOssendorf
Copy link
Contributor

Hi. Can you please explain the changes here? What's the benefit of the Guard and where does it come from?

@hurcane
Copy link

hurcane commented Mar 8, 2025

Simon will need to address the build failures, but I see the benefit as a more concise implementation of boilerplate guard clauses. It comes from the Polyfill package, which I believe is already referenced by Csla for other purposes.

@StefanOssendorf
Copy link
Contributor

Yeah I added the PolyFill package for attributes and the like. To get rid of a lot of #if NET.... stuff.
I agree with boilerplate code, but my "problem" with those Guards is. They are not auto generated. I have to type it for every usage. The normal argument null exception stuff is auto generated via vs. So no effort at all.

@SimonCropp
Copy link
Contributor Author

fair enough. will close

@SimonCropp SimonCropp closed this Mar 8, 2025
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.

3 participants