Expose UnaryExpressionHelpers and BinaryExpressionHelpers #290
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Also promotes my Increment/Decrement and AddAssign/SubtractAssign expressions.
My added expressions are fully documented and ready for NET7. IfDefs can be removed if this is not desired.
Code also assumes a nullable context. I invite discussion on whether to remove nullable annotations or whether to enable nullable. I personally find it is more clear to the developer but this can be removed if requested.
All of these expressions expect numeric types (with appropriate constraints in Net7). In net6, theoretically any type would be allowed, but non-numeric types will throw. This is by design. The expressions simply provide activities for common C# operations.
Increment
=number++
Decrement
=number--
AddAssign
=number += otherNumber
SubtractAssign
=number -= otherNumber
If anyone knows how to add the designer files for these activities, please do let me know. I have been unable to figure out how to do this in Net6 and newer as PresentationCore does not seem to have been ported.
Edit: Fixes #288