これを行うfxcopのルールを作成しようとしています:
特定のクラスが null と比較された場合、エラーになります。
可能だと思いますか?
探していた型を見つけることができたが、値を見つける方法がわかりませんでした。
私はそのコードを持っていることを知っていますが、どこに行くべきかわかりません..
public override ProblemCollection Check(Microsoft.Cci.Member member)
{
Method m = member as Method;
if (m != null)
{
foreach (Statement s in m.Body.Statements)
{
Block b = s as Block;
if (b != null)
{
foreach (Statement s1 in b.Statements)
{
?
}
}
}
}
return this.Problems;
}