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)
1911else if (SyntaxFacts.IsNewLine(ch)) 2061if (position == 0 || SyntaxFacts.IsNewLine(text[position - 1])) 2160while (SyntaxFacts.IsNewLine(this.TextWindow.PeekChar())) 2176if (ch == SlidingTextWindow.InvalidCharacter || SyntaxFacts.IsNewLine(ch)) 2232while (!SyntaxFacts.IsNewLine(ch = TextWindow.PeekChar()) && 2255if (SyntaxFacts.IsNewLine(ch)) 2445if (SyntaxFacts.IsNewLine(ch)) 2484if (SyntaxFacts.IsNewLine(ch)) 2650if (!isEscaped && SyntaxFacts.IsNewLine(character)) 2751if (SyntaxFacts.IsNewLine(ch)) 2846if (SyntaxFacts.IsNewLine(ch)) 3025if (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch)) 3135if (SyntaxFacts.IsNewLine(ch)) 3259else if (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch)) 3408if (SyntaxFacts.IsNewLine(ch)) 3474if (SyntaxFacts.IsNewLine(ch)) 3646if (SyntaxFacts.IsNewLine(consumedChar)) 4011if (SyntaxFacts.IsNewLine(ch)) 4065if (SyntaxFacts.IsNewLine(ch)) 4141if (SyntaxFacts.IsNewLine(ch)) 4195if (SyntaxFacts.IsNewLine(ch)) 4264if (SyntaxFacts.IsNewLine(ch)) 4319if (SyntaxFacts.IsNewLine(ch)) 4472&& (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch))) 4525if (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]))