67 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)
1911else if (SyntaxFacts.IsNewLine(ch)) 2087if (position == 0 || SyntaxFacts.IsNewLine(text[position - 1])) 2186while (SyntaxFacts.IsNewLine(this.TextWindow.PeekChar())) 2202if (ch == SlidingTextWindow.InvalidCharacter || SyntaxFacts.IsNewLine(ch)) 2258while (!SyntaxFacts.IsNewLine(ch = TextWindow.PeekChar()) && 2281if (SyntaxFacts.IsNewLine(ch)) 2478if (SyntaxFacts.IsNewLine(ch)) 2517if (SyntaxFacts.IsNewLine(ch)) 2683if (!isEscaped && SyntaxFacts.IsNewLine(character)) 2784if (SyntaxFacts.IsNewLine(ch)) 2879if (SyntaxFacts.IsNewLine(ch)) 3058if (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch)) 3168if (SyntaxFacts.IsNewLine(ch)) 3292else if (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch)) 3441if (SyntaxFacts.IsNewLine(ch)) 3507if (SyntaxFacts.IsNewLine(ch)) 3679if (SyntaxFacts.IsNewLine(consumedChar)) 4044if (SyntaxFacts.IsNewLine(ch)) 4098if (SyntaxFacts.IsNewLine(ch)) 4174if (SyntaxFacts.IsNewLine(ch)) 4228if (SyntaxFacts.IsNewLine(ch)) 4297if (SyntaxFacts.IsNewLine(ch)) 4352if (SyntaxFacts.IsNewLine(ch)) 4505&& (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch))) 4558if (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 (6)
ConvertToRawString\ConvertToRawStringHelpers.cs (2)
33=> ch.Rune.Utf16SequenceLength == 1 && SyntaxFacts.IsNewLine((char)ch.Value); 97if (ch.Span.Length > 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]))