Exemplo n.º 1
0
 public SyntaxTriviaList InsertRange(SyntaxTriviaList comment, bool indent = false)
 {
     if (indent)
     {
         return(IndentAndInsert(comment.ToFullString()));
     }
     else
     {
         return(LeadingTrivia.InsertRange(Index, comment));
     }
 }
Exemplo n.º 2
0
            static int GetNewlineCount(SyntaxTriviaList trivialList, bool leading)
            {
                var triviaParts = trivialList.ToFullString().Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None).ToImmutableArray();

                return(GetNewlineCount(triviaParts, leading));
Exemplo n.º 3
0
        private static bool TriviaContainsHeader(SyntaxTriviaList triviaList, string header)
        {
            string triviaString = triviaList.ToFullString();

            return(triviaString.StartsWith(header));
        }