Exemple #1
0
        public static SyntaxTree ToggleMultiLineComment(this SyntaxTree syntaxTree, TextSpan textSpan)
        {
            if (syntaxTree == null)
            {
                throw new ArgumentNullException(nameof(syntaxTree));
            }

            var comment = syntaxTree.GetMultiLineComment(textSpan);

            return(comment != null
                ? syntaxTree.UncommentMultiLineComment(comment)
                : syntaxTree.CommentMultiLineComment(textSpan));
        }