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

Extensible enum value comparison clarification. #1251

Merged
merged 1 commit into from
Apr 20, 2020
Merged

Conversation

pakrym
Copy link
Contributor

@pakrym pakrym commented Apr 20, 2020

No description provided.

@pakrym pakrym merged commit 33c6d11 into master Apr 20, 2020
@pakrym pakrym deleted the pakrym-patch-1 branch April 20, 2020 18:47
@@ -134,6 +134,8 @@ In those cases, you should define a structure that:
- Overrides `Equals`, `GetHashCode`, and `ToString` methods.
- `Equals(object)` and `GetHashCode` should be attributed with `EditorBrowsable(EditorBrowsableState.Never)`.

Type of value comparison should be selected on per-service basis, if the service is inconsistent with how string values are returned the case-insensitive comparison is allowed.
Copy link
Member

Choose a reason for hiding this comment

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

Just curious, what triggered this clarification?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code generator generates case-insensitive comparisons because it's impossible to say if service is well-behaving.

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