66 references to IsNewLine
Microsoft.CodeAnalysis.CSharp (44)
Binder\Binder_InterpolatedString.cs (1)
131else if (SyntaxFacts.IsWhitespace(lastChar = text[text.Length - 1]) || SyntaxFacts.IsNewLine(lastChar))
Parser\LanguageParser_InterpolatedString.cs (3)
195var isBlankLine = (currentIndex == text.Length && isLast) || (currentIndex < text.Length && SyntaxFacts.IsNewLine(text[currentIndex])); 284if (openBracePosition > 0 && SyntaxFacts.IsNewLine(originalText[openBracePosition - 1])) 337if (!SyntaxFacts.IsNewLine(ch))
Parser\Lexer.cs (25)
1896else if (SyntaxFacts.IsNewLine(ch)) 2046if (position == 0 || SyntaxFacts.IsNewLine(text[position - 1])) 2145while (SyntaxFacts.IsNewLine(this.TextWindow.PeekChar())) 2161if (ch == SlidingTextWindow.InvalidCharacter || SyntaxFacts.IsNewLine(ch)) 2217while (!SyntaxFacts.IsNewLine(ch = TextWindow.PeekChar()) && 2240if (SyntaxFacts.IsNewLine(ch)) 2430if (SyntaxFacts.IsNewLine(ch)) 2469if (SyntaxFacts.IsNewLine(ch)) 2635if (!isEscaped && SyntaxFacts.IsNewLine(character)) 2736if (SyntaxFacts.IsNewLine(ch)) 2831if (SyntaxFacts.IsNewLine(ch)) 3010if (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch)) 3120if (SyntaxFacts.IsNewLine(ch)) 3244else if (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch)) 3393if (SyntaxFacts.IsNewLine(ch)) 3459if (SyntaxFacts.IsNewLine(ch)) 3631if (SyntaxFacts.IsNewLine(consumedChar)) 3996if (SyntaxFacts.IsNewLine(ch)) 4050if (SyntaxFacts.IsNewLine(ch)) 4126if (SyntaxFacts.IsNewLine(ch)) 4180if (SyntaxFacts.IsNewLine(ch)) 4249if (SyntaxFacts.IsNewLine(ch)) 4304if (SyntaxFacts.IsNewLine(ch)) 4457&& (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch))) 4510if (SyntaxFacts.IsNewLine(ch))
Parser\Lexer_RawStringLiteral.cs (8)
68if (SyntaxFacts.IsNewLine(TextWindow.PeekChar())) 135if (SyntaxFacts.IsNewLine(currentChar)) 197Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.PeekChar())); 224Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.PeekChar())); 289if (SyntaxFacts.IsNewLine(currentChar)) 317Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.PeekChar())); 341var isBlankLine = SyntaxFacts.IsNewLine(TextWindow.PeekChar()); 382if (SyntaxFacts.IsNewLine(currentChar))
Parser\Lexer_StringLiteral.cs (4)
57else if (SyntaxFacts.IsNewLine(ch) || 363(!allowNewline && SyntaxFacts.IsNewLine(ch)) || 488if (SyntaxFacts.IsNewLine(window.PeekChar())) 729if (SyntaxFacts.IsNewLine(_lexer.TextWindow.PeekChar()))
Parser\SlidingTextWindow.cs (2)
303Debug.Assert(SyntaxFacts.IsNewLine(this.PeekChar())); 309Debug.Assert(SyntaxFacts.IsNewLine(currentChar));
SymbolDisplay\ObjectDisplay.cs (1)
302if (SyntaxFacts.IsNewLine(c))
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
47=> SyntaxFacts.IsNewLine(ch);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.cs (1)
27=> SyntaxFacts.IsWhitespace(c) || SyntaxFacts.IsNewLine(c);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
487=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
87if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
89if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (5)
BlockCommentEditing\BlockCommentEditingCommandHandler.cs (1)
90while (end < snapshot.Length && SyntaxFacts.IsWhitespace(end.GetChar()) && !SyntaxFacts.IsNewLine(end.GetChar()))
StringCopyPaste\StringCopyPasteHelpers.cs (1)
562if (SyntaxFacts.IsNewLine(text[i]))
StringCopyPaste\StringInfo.cs (2)
123Contract.ThrowIfFalse(SyntaxFacts.IsNewLine(text[rawStart])); 138Contract.ThrowIfFalse(SyntaxFacts.IsNewLine(text[rawEnd - 1]));
StringCopyPaste\UnknownSourcePasteProcessor.cs (1)
290else if (!lastChange && lineWithoutLeadingWhitespace.Length > 0 && SyntaxFacts.IsNewLine(lineWithoutLeadingWhitespace[0]))
Microsoft.CodeAnalysis.CSharp.Features (5)
ConvertToRawString\ConvertToRawStringHelpers.cs (1)
33=> ch.Rune.Utf16SequenceLength == 1 && SyntaxFacts.IsNewLine((char)ch.Value);
MetadataAsSource\FormattingRule.cs (1)
66=> SyntaxFacts.IsNewLine(c);
src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
87if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
89if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
Structure\Providers\DisabledTextTriviaStructureProvider.cs (1)
73endPos >= 1 && SyntaxFacts.IsNewLine(text[endPos - 1]) ? endPos - 1 : endPos;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
LexicalAndXml\RawStringLiteralLexingTests.cs (1)
246if (charValue == '"' || SyntaxFacts.IsNewLine(charValue))
LexicalAndXml\XmlDocCommentTests.cs (2)
926Assert.True(SyntaxFacts.IsNewLine('\u0085')); 1204Assert.True(SyntaxFacts.IsNewLine('\u0085'));
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
47=> SyntaxFacts.IsNewLine(ch);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.cs (1)
27=> SyntaxFacts.IsWhitespace(c) || SyntaxFacts.IsNewLine(c);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
487=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\Formatting\FormatDocumentOnTypeHandler.cs (1)
49if (string.IsNullOrEmpty(request.Character) || SyntaxFacts.IsNewLine(request.Character[0]))