28 references to WithLeadingTrivia
Microsoft.CodeAnalysis (4)
Syntax\SyntaxNodeExtensions.cs (1)
364var newFirst = first.WithLeadingTrivia(trivia);
Syntax\SyntaxNodeOrToken.cs (1)
401return AsToken().WithLeadingTrivia(trivia);
Syntax\SyntaxToken.cs (2)
462return this.WithLeadingTrivia((IEnumerable<SyntaxTrivia>)trivia); 470return this.WithLeadingTrivia((IEnumerable<SyntaxTrivia>?)trivia);
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
134return token.WithLeadingTrivia(trivia.Concat(token.LeadingTrivia));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\RemoveUnnecessaryImportsHelpers.cs (1)
28return token.WithLeadingTrivia(trimmedLeadingTrivia);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
541var tokenWithInsertedTrivia = tokenToInsertTrivia.WithLeadingTrivia(trivia.Concat(tokenToInsertTrivia.LeadingTrivia));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AddImportHelpers.cs (1)
39var newFirstToken = firstToken.WithLeadingTrivia(
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (1)
28token = token.WithLeadingTrivia(Enumerable.Empty<SyntaxTrivia>());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
230.WithLeadingTrivia(token.LeadingTrivia.FilterComments(addElasticMarker: true));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
315withoutBlankLine = token.WithLeadingTrivia(leadingTrivia.Skip(2));
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (1)
89var updatedSecondBrace = secondBrace.WithLeadingTrivia(
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
68.WithLeadingTrivia(leadingTrivia.Take(skippedTriviaIndex))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
140closeBrace = closeBrace.WithLeadingTrivia(
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
315withoutBlankLine = token.WithLeadingTrivia(leadingTrivia.Skip(2));
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (1)
89var updatedSecondBrace = secondBrace.WithLeadingTrivia(
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
68.WithLeadingTrivia(leadingTrivia.Take(skippedTriviaIndex))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
3228return newToken.WithLeadingTrivia(existingLeadingTrivia.Concat(newLeadingTrivia));
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (1)
28token = token.WithLeadingTrivia(Enumerable.Empty<SyntaxTrivia>());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
230.WithLeadingTrivia(token.LeadingTrivia.FilterComments(addElasticMarker: true));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
140closeBrace = closeBrace.WithLeadingTrivia(
Microsoft.CodeAnalysis.Features (3)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (3)
133return startToken.WithLeadingTrivia(trivia.InsertRange(index, pragmaTrivia)); 196return endToken.WithLeadingTrivia(trivia.InsertRange(index, pragmaTrivia)); 228var newStartToken = startToken.WithLeadingTrivia(previousOfStart.TrailingTrivia.Concat(startToken.LeadingTrivia));
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
134return token.WithLeadingTrivia(trivia.Concat(token.LeadingTrivia));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\RemoveUnnecessaryImportsHelpers.cs (1)
28return token.WithLeadingTrivia(trimmedLeadingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
541var tokenWithInsertedTrivia = tokenToInsertTrivia.WithLeadingTrivia(trivia.Concat(tokenToInsertTrivia.LeadingTrivia));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AddImportHelpers.cs (1)
39var newFirstToken = firstToken.WithLeadingTrivia(