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

Return Guid from string.IsGuid #149

Closed
ndrwrbgs opened this issue Feb 9, 2021 · 0 comments · Fixed by #150
Closed

Return Guid from string.IsGuid #149

ndrwrbgs opened this issue Feb 9, 2021 · 0 comments · Fixed by #150
Labels

Comments

@ndrwrbgs
Copy link
Contributor

ndrwrbgs commented Feb 9, 2021

Why

Our code was like
Ensure.That().IsGuid();
return new Guid();

No big deal, but knowing that IsGuid already constructed the Guid and we do it again felt weird enough to bother mentioning here.

Ideating

Not actually saying "let's do this" just opening the floor for discussion on it.

Depends if it matches the style elsewhere in the library, but if it's not a crazy deviation, might consider it.

If nothing else returns the value, we should not, as it enables us to later do something like enable chaining validations, which wouldn't be possible if this returned the value

Though, perhaps as an out parameter?

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

Successfully merging a pull request may close this issue.

2 participants