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

Add support for components defining their own Equals and GetHashCode #1181

Merged
merged 4 commits into from
Apr 29, 2022

Conversation

manodasanW
Copy link
Member

  • If a component doesn't provide one, CsWinRT provides one as it did before.
  • If a component does provide one, then CsWinRT calls the provided one instead.
  • For Equal(Class..), if the return type doesn't match with IEquatable, then CsWinRT generates its own explicitly implemented version for the IEquatable interface and also defines one to call the component provided one.

Fixes #864

@manodasanW manodasanW requested a review from j0shuams April 29, 2022 18:07
@ghost
Copy link

ghost commented Apr 29, 2022

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

❌ manodasanW sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

src/cswinrt/helpers.h Outdated Show resolved Hide resolved
@manodasanW manodasanW merged commit 2b0f74b into master Apr 29, 2022
@manodasanW manodasanW deleted the manodasanw/customequals branch April 29, 2022 23:15
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.

error CS0111: Type 'SomeType' already defines a member called 'Equals' with the same parameter types
2 participants