Implemented interface member:
85 references to
Microsoft.CodeAnalysis (7)
Syntax\SyntaxTriviaList.cs (7)
113return this[index]; 203return this[this.Count - 1]; 235var trivia = this[i]; 249if (this[i].RawKind == rawKind) 341builder.Add(this[i]); 348builder.Add(this[i]); 503var first = this[offset];
Microsoft.CodeAnalysis.CodeStyle (7)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
59var trivia = firstToken.LeadingTrivia[i];
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (4)
101leadingTrivia[i - 1].HasStructure) 103firstBadTrivia = leadingTrivia[i]; 118firstBadTrivia = leadingTrivia[i + 1]; 133var trivia = triviaList[index];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\TriviaHelpers.cs (1)
21builder.Add(triviaList[i]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (1)
128if (this.SyntaxFacts.IsPreprocessorDirective(leadingTrivia[i]))
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (3)
119var triviaLine = triviaList[i]; 185if (leadingTrivia[i].RawKind == syntaxFacts.SyntaxKinds.EndOfLineTrivia) 189else if (leadingTrivia[i].RawKind != syntaxFacts.SyntaxKinds.WhitespaceTrivia)
src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (4)
71var trivia = triviaList[currentStart]; 112if (triviaList[currentStart - 1].HasStructure) 124builder.Add(triviaList[currentStart + 1]); 141var trivia = triviaList[index];
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
90var nextTrivia = parentToken.LeadingTrivia[triviaIndex + 1];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaListExtensions.cs (1)
82yield return triviaList[start++];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (1)
118var trivia = triviaList[i];
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (15)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
340if (triviaList[i].IsEndOfLine())
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionCodeFixProvider.cs (1)
84if (lastIndex < triviaList.Count && triviaList[lastIndex].IsEndOfLine())
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveCodeFixProvider.cs (4)
100if (index >= 0 && leadingTrivia[index].IsWhitespace()) 103return index >= 0 && leadingTrivia[index].IsEndOfLine(); 108if (index < leadingTrivia.Count && leadingTrivia[index].IsWhitespace()) 111return index < leadingTrivia.Count && leadingTrivia[index].IsEndOfLine();
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
48var skippedTrivia = leadingTrivia[skippedTriviaIndex];
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (7)
618var currentTrivia = token.LeadingTrivia[i]; 619var nextTrivia = token.LeadingTrivia[i + 1]; 621var afterNewLine = i == 0 || token.LeadingTrivia[i - 1].IsEndOfLine(); 675var currentTrivia = leadingTrivia[i]; 692leadingTrivia[lastLeadingCommentIndex + 1].IsEndOfLine()) 694newLeadingTrivia.Add(leadingTrivia[lastLeadingCommentIndex + 1]); 860while (index - 1 >= 0 && trivia[index - 1].Kind() == SyntaxKind.WhitespaceTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
129if (!leadingTrivia[i].IsWhitespaceOrEndOfLine())
Microsoft.CodeAnalysis.CSharp.Features (23)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
195switch (list[i].Kind())
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider_DocumentationComments.cs (1)
66if (triviaIndex > 0 && triviaList[triviaIndex - 1].IsWhitespace())
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
165while (commentIndex < leadingTrivia.Count && leadingTrivia[commentIndex].Kind() is SyntaxKind.EndOfLineTrivia)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
340if (triviaList[i].IsEndOfLine())
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionCodeFixProvider.cs (1)
84if (lastIndex < triviaList.Count && triviaList[lastIndex].IsEndOfLine())
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveCodeFixProvider.cs (4)
100if (index >= 0 && leadingTrivia[index].IsWhitespace()) 103return index >= 0 && leadingTrivia[index].IsEndOfLine(); 108if (index < leadingTrivia.Count && leadingTrivia[index].IsWhitespace()) 111return index < leadingTrivia.Count && leadingTrivia[index].IsEndOfLine();
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
48var skippedTrivia = leadingTrivia[skippedTriviaIndex];
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (7)
618var currentTrivia = token.LeadingTrivia[i]; 619var nextTrivia = token.LeadingTrivia[i + 1]; 621var afterNewLine = i == 0 || token.LeadingTrivia[i - 1].IsEndOfLine(); 675var currentTrivia = leadingTrivia[i]; 692leadingTrivia[lastLeadingCommentIndex + 1].IsEndOfLine()) 694newLeadingTrivia.Add(leadingTrivia[lastLeadingCommentIndex + 1]); 860while (index - 1 >= 0 && trivia[index - 1].Kind() == SyntaxKind.WhitespaceTrivia)
Structure\Providers\DisabledTextTriviaStructureProvider.cs (6)
49if (!parentTriviaList[indexInParent - 1].IsKind(SyntaxKind.IfDirectiveTrivia) && 50!parentTriviaList[indexInParent - 1].IsKind(SyntaxKind.ElifDirectiveTrivia) && 51!parentTriviaList[indexInParent - 1].IsKind(SyntaxKind.ElseDirectiveTrivia)) 91var currentTrivia = triviaList[i]; 111return triviaList[i - 1]; 126return triviaList[i - 1];
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
LexicalAndXml\SyntaxTokenParserTests.cs (2)
422Assert.Equal(kind, leadingTrivia[i].Kind()); 423Assert.Equal(text, leadingTrivia[i].ToFullString());
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Classification\Worker.cs (2)
280triviaList[index - 1].Kind() == SyntaxKind.EndOfLineTrivia && 281triviaList[index - 2].Kind() == SyntaxKind.ConflictMarkerTrivia)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3654if (triviaList[i].IsEndOfLine())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
90var nextTrivia = parentToken.LeadingTrivia[triviaIndex + 1];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaListExtensions.cs (1)
82yield return triviaList[start++];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (1)
118var trivia = triviaList[i];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
129if (!leadingTrivia[i].IsWhitespaceOrEndOfLine())
Microsoft.CodeAnalysis.Features (12)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
59var trivia = firstToken.LeadingTrivia[i];
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (4)
101leadingTrivia[i - 1].HasStructure) 103firstBadTrivia = leadingTrivia[i]; 118firstBadTrivia = leadingTrivia[i + 1]; 133var trivia = triviaList[index];
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (3)
119var triviaLine = triviaList[i]; 185if (leadingTrivia[i].RawKind == syntaxFacts.SyntaxKinds.EndOfLineTrivia) 189else if (leadingTrivia[i].RawKind != syntaxFacts.SyntaxKinds.WhitespaceTrivia)
src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (4)
71var trivia = triviaList[currentStart]; 112if (triviaList[currentStart - 1].HasStructure) 124builder.Add(triviaList[currentStart + 1]); 141var trivia = triviaList[index];
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\TriviaHelpers.cs (1)
21builder.Add(triviaList[i]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (1)
128if (this.SyntaxFacts.IsPreprocessorDirective(leadingTrivia[i]))