Beispiel #1
0
            public override SyntaxNode VisitCompilationUnit(CompilationUnitSyntax node)
            {
                if (!node.Options.Any(opt => !opt.ChildTokens().Any(t => t.Kind() == SyntaxKind.StrictKeyword)))
                {
                    node = node.AddOptions(OptionStatement(Token(SyntaxKind.StrictKeyword), Token(SyntaxKind.OnKeyword)));
                }

                return(base.VisitCompilationUnit(node));
            }