private void CheckMemberAccess(SyntaxNodeAnalysisContext context) { var memberAccessExpression = context.Node as MemberAccessExpressionSyntax; if (memberAccessExpression == null) { return; } var memberAccessAnalyzer = new VariableAccessChecker(context.SemanticModel); if (memberAccessAnalyzer.ShouldUseTap(memberAccessExpression)) { context.ReportDiagnostic(Diagnostic.Create(Rule, memberAccessExpression.GetLocation())); } }