Пример #1
0
        private void AnalyzeSyntaxNode(SyntaxNodeAnalysisContext context)
        {
            var interpolation = (InterpolationSyntax)context.Node;

            if (MergeInterpolationIntoInterpolatedStringRefactoring.CanRefactor(interpolation))
            {
                context.ReportDiagnostic(DiagnosticDescriptors.MergeInterpolationIntoInterpolatedString, interpolation);
            }
        }
        private void AnalyzeSyntaxNode(SyntaxNodeAnalysisContext context)
        {
            if (GeneratedCodeAnalyzer?.IsGeneratedCode(context) == true)
            {
                return;
            }

            var interpolation = (InterpolationSyntax)context.Node;

            if (MergeInterpolationIntoInterpolatedStringRefactoring.CanRefactor(interpolation))
            {
                context.ReportDiagnostic(
                    DiagnosticDescriptors.MergeInterpolationIntoInterpolatedString,
                    interpolation.GetLocation());
            }
        }