예제 #1
0
        protected override ImmutableArray <Diagnostic> AnalyzeSemanticModel(SemanticModelAnalysisContext context, SimpleIntervalTree <TextSpan, TextSpanIntervalIntrospector>?codeBlockIntervalTree)
        {
            var semanticModel     = context.SemanticModel;
            var cancellationToken = context.CancellationToken;

            var options = context.GetCSharpAnalyzerOptions().GetSimplifierOptions();
            var root    = semanticModel.SyntaxTree.GetRoot(cancellationToken);

            var simplifier = new TypeSyntaxSimplifierWalker(this, semanticModel, options, ignoredSpans: codeBlockIntervalTree, cancellationToken);

            simplifier.Visit(root);
            return(simplifier.Diagnostics);
        }