[Feature] Improve the conversion and comparison logic in IsEqualStateTrigger #3681
Labels
Completed 🔥
feature request 📬
A request for new changes to improve functionality
helpers ✋
improvements ✨
Milestone
Describe the problem this feature would solve
Currently
IsEqualStateTrigger
can handle many cases, but code paths for them are not optimal.Comparing two value types will fail with
==
which isReferenceEquals
, and fallback to conversion route.Comparing enum with string will throw an exception, then successes with
Convert.ChangeType
to change enum to string.Enum.IsDefined
won't accept flags combinations.Describe the solution
Refine the conversion and comparison logic.
Add unit test.
The text was updated successfully, but these errors were encountered: