-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Refactor "Routing/Builder" methods pre conditions #41783
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
Conversation
…ArgumentNullException ThrowIfNull
…onditions => ArgumentNullException ThrowIfNull
…ions => ArgumentNullException ThrowIfNull
…ntNullException ThrowIfNull
…nditions => ArgumentNullException ThrowIfNull
{ | ||
throw new ArgumentNullException(nameof(items)); | ||
} | ||
ArgumentNullException.ThrowIfNull(builder, nameof(builder)); |
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.
Why is nameof needed? Isn't it inferred by default from the expression passed in?
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.
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.
It just got fixed
…names from ArgumentNullException
Hi @mottaghipour. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
@mottaghipour Why did you close this PR? s there some reason you do not want us to merge this change? |
@halter73 After pulling, I read the contributing guidelines and in this part, I realized that my work was wrong, refactoring here is bad for merge! |
Generally, we like people to file an issue first. Mostly it's so people don't waste time on PRs that we won't merge. In this particular case it's fine though. Thanks for your contribution! |
Refactor "Routing/Builder" methods pre conditions
Replace block conditions with "ArgumentNullException.ThrowIfNull(...);"