76 references to IsNewLine
Microsoft.CodeAnalysis.CSharp (42)
Binder\Binder_InterpolatedString.cs (1)
131
else if (SyntaxFacts.IsWhitespace(lastChar = text[text.Length - 1]) || SyntaxFacts.
IsNewLine
(lastChar))
Parser\LanguageParser_InterpolatedString.cs (3)
301
var isBlankLine = (currentIndex == text.Length && isLast) || (currentIndex < text.Length && SyntaxFacts.
IsNewLine
(text[currentIndex]));
392
if (openBracePosition > 0 && SyntaxFacts.
IsNewLine
(originalText[openBracePosition - 1]))
463
if (!SyntaxFacts.
IsNewLine
(ch))
Parser\Lexer.cs (25)
1891
else if (SyntaxFacts.
IsNewLine
(ch))
2067
if (position == 0 || SyntaxFacts.
IsNewLine
(text[position - 1]))
2166
while (SyntaxFacts.
IsNewLine
(this.TextWindow.PeekChar()))
2182
if (ch == SlidingTextWindow.InvalidCharacter || SyntaxFacts.
IsNewLine
(ch))
2238
while (!SyntaxFacts.
IsNewLine
(ch = TextWindow.PeekChar()) &&
2261
if (SyntaxFacts.
IsNewLine
(ch))
2454
if (SyntaxFacts.
IsNewLine
(ch))
2493
if (SyntaxFacts.
IsNewLine
(ch))
2682
if (!isEscaped && SyntaxFacts.
IsNewLine
(character))
2783
if (SyntaxFacts.
IsNewLine
(ch))
2878
if (SyntaxFacts.
IsNewLine
(ch))
3057
if (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.
IsNewLine
(ch))
3167
if (SyntaxFacts.
IsNewLine
(ch))
3291
else if (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.
IsNewLine
(ch))
3440
if (SyntaxFacts.
IsNewLine
(ch))
3506
if (SyntaxFacts.
IsNewLine
(ch))
3678
if (SyntaxFacts.
IsNewLine
(consumedChar))
4043
if (SyntaxFacts.
IsNewLine
(ch))
4097
if (SyntaxFacts.
IsNewLine
(ch))
4173
if (SyntaxFacts.
IsNewLine
(ch))
4227
if (SyntaxFacts.
IsNewLine
(ch))
4296
if (SyntaxFacts.
IsNewLine
(ch))
4351
if (SyntaxFacts.
IsNewLine
(ch))
4504
&& (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.
IsNewLine
(ch)))
4557
if (SyntaxFacts.
IsNewLine
(ch))
Parser\Lexer_RawStringLiteral.cs (4)
62
if (SyntaxFacts.
IsNewLine
(TextWindow.PeekChar()))
111
if (SyntaxFacts.
IsNewLine
(currentChar) || IsAtEndOfText(currentChar))
137
Debug.Assert(SyntaxFacts.
IsNewLine
(TextWindow.PeekChar()));
162
if (SyntaxFacts.
IsNewLine
(currentChar))
Parser\Lexer_StringLiteral.cs (5)
57
else if (SyntaxFacts.
IsNewLine
(ch) ||
370
(!allowNewline && SyntaxFacts.
IsNewLine
(ch)) ||
504
if (SyntaxFacts.
IsNewLine
(window.PeekChar()))
581
width: SyntaxFacts.
IsNewLine
(_lexer.TextWindow.PeekChar()) ? 1 : 0, ErrorCode.ERR_UnterminatedRawString));
748
if (SyntaxFacts.
IsNewLine
(_lexer.TextWindow.PeekChar()))
Parser\SlidingTextWindow.cs (2)
290
Debug.Assert(SyntaxFacts.
IsNewLine
(this.PeekChar()));
296
Debug.Assert(SyntaxFacts.
IsNewLine
(currentChar));
SymbolDisplay\ObjectDisplay.cs (1)
298
if (SyntaxFacts.
IsNewLine
(c))
Syntax\SyntaxNormalizer.cs (1)
1259
return text.Length > 0 && SyntaxFacts.
IsNewLine
(text[^1]);
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
46
=> SyntaxFacts.
IsNewLine
(ch);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (1)
312
if (!string.IsNullOrEmpty(triviaString) && SyntaxFacts.
IsNewLine
(triviaString[^1]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.cs (1)
27
=> SyntaxFacts.IsWhitespace(c) || SyntaxFacts.
IsNewLine
(c);
src\roslyn\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\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
85
if (end < text.Length && SyntaxFacts.
IsNewLine
(text[end]))
src\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
87
if (end < text.Length && SyntaxFacts.
IsNewLine
(text[end]))
Microsoft.CodeAnalysis.CSharp.Features (7)
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (1)
619
while (SyntaxFacts.
IsNewLine
(builder[beforeNewLines - 1]))
ConvertToRawString\ConvertToRawStringHelpers.cs (2)
31
=> SyntaxFacts.
IsNewLine
(ch);
101
if (SyntaxFacts.
IsNewLine
(ch))
MetadataAsSource\FormattingRule.cs (1)
66
=> SyntaxFacts.
IsNewLine
(c);
src\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
85
if (end < text.Length && SyntaxFacts.
IsNewLine
(text[end]))
src\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
87
if (end < text.Length && SyntaxFacts.
IsNewLine
(text[end]))
Structure\Providers\DisabledTextTriviaStructureProvider.cs (1)
72
endPos >= 1 && SyntaxFacts.
IsNewLine
(text[endPos - 1]) ? endPos - 1 : endPos;
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
46
=> SyntaxFacts.
IsNewLine
(ch);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (1)
312
if (!string.IsNullOrEmpty(triviaString) && SyntaxFacts.
IsNewLine
(triviaString[^1]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.cs (1)
27
=> SyntaxFacts.IsWhitespace(c) || SyntaxFacts.
IsNewLine
(c);
src\roslyn\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.Razor.Compiler (13)
Language\Legacy\HtmlTokenizer.cs (3)
154
else if (SyntaxFacts.
IsNewLine
(CurrentCharacter))
197
!(SyntaxFacts.IsWhitespace(CurrentCharacter) || SyntaxFacts.
IsNewLine
(CurrentCharacter)) &&
271
Debug.Assert(SyntaxFacts.
IsNewLine
(CurrentCharacter));
Language\Legacy\NativeCSharpTokenizer.cs (5)
363
if (SyntaxFacts.
IsNewLine
(CurrentCharacter))
570
private static readonly Func<char, bool> IsEndQuotedCharacterLiteral = static (c) => c == '\\' || c == '\'' || SyntaxFacts.
IsNewLine
(c);
571
private static readonly Func<char, bool> IsEndQuotedStringLiteral = static (c) => c == '\\' || c == '\"' || SyntaxFacts.
IsNewLine
(c);
587
else if (EndOfFile || SyntaxFacts.
IsNewLine
(CurrentCharacter))
627
TakeUntil(c => SyntaxFacts.
IsNewLine
(c));
Language\Legacy\ParserHelpers.cs (1)
21
return (value is [var ch] && SyntaxFacts.
IsNewLine
(ch)) ||
Language\Legacy\RoslynCSharpTokenizer.cs (1)
236
if (SyntaxFacts.
IsNewLine
(CurrentCharacter) || SyntaxFacts.IsWhitespace(CurrentCharacter))
Language\Legacy\SourceLocationTracker.cs (1)
38
(SyntaxFacts.
IsNewLine
(characterRead) && (characterRead != '\r' || nextCharacter != '\n')))
Language\Syntax\SyntaxNodeExtensions.cs (2)
61
var endsWithLineBreak = SyntaxFacts.
IsNewLine
(source.Text[lastPosition]);
96
var endsWithLineBreak = SyntaxFacts.
IsNewLine
(source.Text[lastPosition]);
Roslyn.Diagnostics.CSharp.Analyzers (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
46
=> SyntaxFacts.
IsNewLine
(ch);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (1)
312
if (!string.IsNullOrEmpty(triviaString) && SyntaxFacts.
IsNewLine
(triviaString[^1]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.cs (1)
27
=> SyntaxFacts.IsWhitespace(c) || SyntaxFacts.
IsNewLine
(c);
src\roslyn\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)));