protected void GetDiagnosticsForNode(SyntaxNode node, SemanticModel model, Action<Diagnostic> addDiagnostic) { var type = model.GetTypeInfo(node).Type; if (type != null && TypeHasWeakIdentity(type, model)) { addDiagnostic(node.CreateDiagnostic(Rule, type.ToDisplayString())); } }
protected Diagnostic CreateDiagnostic(SyntaxNode node) { return node.CreateDiagnostic(Rule); }