FxCop的自定义规则 - 检查WinForm控件的属性自定义、控件、属性、规则

2023-09-05 02:58:12 作者:心死旳很干净

我要寻找一个的FxCop规则的检查创建控件的属性的一个例子。

I am looking for an example of a FxCop Rule that inspects the properties of controls created.

有没有人见过?或不知道如何在FxCop的SDK属性集应对?

Has anyone seen one? Or know how to respond to a property set in the FxCop SDK?

丰富。

推荐答案

我solutionwas遍历提供给每个成员被检查的指令列表。

My solutionwas to iterate through the instruction list provided for each member been checked.

如果它是类型Microsoft.FxCop.SDK.Method那么_set的preFIX确定了属性集。

If its was of type Microsoft.FxCop.SDK.Method then a prefix of _set identified a property set.

唯一的问题我已经是这并没有让我确定已经留在设计师的默认值属性。

The only issue i have is this doesn't allow me to identify properties that have been left at the designer default values.

 
精彩推荐