-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
New Feature Proposal
Description
At the moment the diffs are not very meaningful. If you implement a custom diff logic, you cannot tell later what kind of diff it actually is. So to use the diffs you need a lot of switches and you have to repeat the logic of the filters.
e.g. we use this code: https://github.com/SebastianStehle/mjml-net/blob/5bbb6f3c9e97a33a8657a50d9921cb779d92fba5/Tests/Internal/AssertHelpers.cs#L134
Furthermore the texts for the diffs are only available via DebuggerDisplay attribute.
What I would like to see is:
- More types for diffs (e.g. each case you should be its own class.
- Implement "ToString()" instead of debugger display.
- Override the diff in the filters.
e.g. the FilterStrategy could be changed to:
public delegate (IDiff? Diff, FilterDecision) FilterStrategy<TSource>(in TSource source, FilterDecision currentDecision)
Because the version is lower than 1.0 I do not see a problem to just change that, but it would not be a problem to add a new filter strategy and to implement the old logic using the new logic.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request