3 ms·
> The analyzer has detected two identically implemented functions. As their names, Convert and ConvertBack, suggest, they were meant to do different things, but
by mastax 8y ago
> The analyzer has detected two identically implemented functions. As their names, Convert and ConvertBack, suggest, they were meant to do different things, but the developers should know better.
This is not a bug. Look how the `BooleanNegationConverter` is used:
<RadioButton x:Name="fullKeypad"
...
IsChecked="{x:Bind Model.IsBitFlipChecked, Converter={StaticResource BooleanNegationConverter}, Mode=TwoWay}"/>
<RadioButton x:Name="bitFlip"
...
IsChecked="{x:Bind Model.IsBitFlipChecked, Mode=TwoWay}"/>
Two radio buttons bound to the same boolean value, one with the negation converter. If `fullKeypad` is checked, `IsBitFlipChecked` should be set to false. If `IsBitFlipChecked` is set to true, `fullKeypad.IsChecked` should be set to false. The converter needs to do the same operation in both directions.
- taco_emoji 8y agoAgree it's not a bug as I assume it's an implementation of the IValueConverter interface: https://docs.microsoft.com/en-us/dotnet/api/system.windows.data.ivalueconverter?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.windows.d... However since the method bodies are identical, IMO one should have the full implementation and then the other should just call the first. Still not a bug, just a code smell.