Gendarme code analysis with WPF

29 views
Skip to first unread message

Константин Малышко

unread,
Feb 4, 2013, 1:09:23 AM2/4/13
to gend...@googlegroups.com
Hello, 
In my project I have the following case: we use Sonar with pluged in Gendarme code analysis.
I have quesion about "AvoidUncalledPrivateCodeRule".
In case of MVVM pattern often this rule give us wrong violation.
Sample:

View Model class:

internal TestClass
{
    public bool IsDigit {get; set;}
}

This class used in view in XAML binding. For example like this:

<DataTrigger Binding="{Binding Path=IsDigit }" Value="True">
<Setter Property="Header" Value="Digit!"/>
</DataTrigger>

In described sample Gendarme will throw "AvoidUncalledPrivateCodeRule" violation and look like that it doesn't analyze XAML for using "problematic"  class members.
Could be avoided somehow except using "supress warning" attribute?

Reply all
Reply to author
Forward
0 new messages