You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that all of the examples in the README use the same parameterName as the input. I wonder if most often athis library will be used like this, with the same parameterName as input (and therefore a lot of duplication).
A simpler approach might be to have overloads for each method in GuardClauses.cs that don't have the parameterName parameter, and uses the nameof the input.
I just forked the repo and have an example of what I mean in this commit
With that in mind, would you accept a pull request which adds an overload with a simpler signature for each of the methods in the library?
If you would, I will happily do one!
Nick
The text was updated successfully, but these errors were encountered:
I commented on your commit. If you can make it work so it's not always just the argument name within GuardClauses (but the actual argument name being checked) I'd gladly accept such a PR.
This seems so obvious now (I must confess I didn't actually run the code). I will have a think about if this is possible although I'm sure you've been thinking about this a lot longer and harder than I have!
I noticed that all of the examples in the README use the same
parameterName
as theinput
. I wonder if most often athis library will be used like this, with the sameparameterName
asinput
(and therefore a lot of duplication).A simpler approach might be to have overloads for each method in GuardClauses.cs that don't have the
parameterName
parameter, and uses thenameof
the input.I just forked the repo and have an example of what I mean in this commit
With that in mind, would you accept a pull request which adds an overload with a simpler signature for each of the methods in the library?
If you would, I will happily do one!
Nick
The text was updated successfully, but these errors were encountered: