private void AnalyzeAwaitExpression(SyntaxNodeAnalysisContext context) { var awaitExpression = (AwaitExpressionSyntax)context.Node; if (CallConfigureAwaitRefactoring.CanRefactor(awaitExpression, context.SemanticModel, context.CancellationToken)) { context.ReportDiagnostic( DiagnosticDescriptors.CallConfigureAwait, awaitExpression.Expression); } }
private void AnalyzeAwaitExpression(SyntaxNodeAnalysisContext context) { if (GeneratedCodeAnalyzer?.IsGeneratedCode(context) == true) { return; } var awaitExpression = (AwaitExpressionSyntax)context.Node; if (CallConfigureAwaitRefactoring.CanRefactor(awaitExpression, context.SemanticModel, context.CancellationToken)) { context.ReportDiagnostic( DiagnosticDescriptors.AddConfigureAwait, awaitExpression.Expression.GetLocation()); } }