Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
We noticed after upgrading our blazor application to .net 8.0 that some EventCallback keep being modified. Eventhough the value was the same, the same target component, the same method.
The generated code that renders the component seems to fabricate a new MulticastDelegate, having the same Type, Target and Method. The implementation of EventCallback uses Object.ReferenceEquals, so it concludes it is different every render.
Expected Behavior
The component should see EventCallbacks as equal when the delegate and Target are the same. MulticastDelegate has the Equals method overridden, so use that instead of ReferenceEquals.
Steps To Reproduce
I will make a PR with a fix
Exceptions (if any)
No response
.NET Version
8.0.101
Anything else?
No response