39 references to Trivia
Microsoft.CodeAnalysis.CSharp (1)
Syntax\CSharpSyntaxRewriter.cs (1)
127return SyntaxFactory.Trivia(newStructure);
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (2)
338var formattedTrivia = SyntaxFactory.Trivia((StructuredTriviaSyntax)result.GetFormattedRoot(cancellationToken)); 372var formattedTrivia = SyntaxFactory.Trivia((StructuredTriviaSyntax)result.GetFormattedRoot(cancellationToken));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (1)
119Trivia(singleLineInheritdocComment));
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
680.Append(Trivia(newClassDocComment)) 687.Replace(classDocComment.Value, Trivia(newClassDocComment))
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (2)
158return Trivia(DocumentationCommentTrivia( 220Trivia(DocumentationCommentTrivia(SyntaxKind.SingleLineDocumentationCommentTrivia, [.. allContent])));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
124return Trivia(updatedSyntax);
Microsoft.CodeAnalysis.CSharp.Features (14)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (2)
58var pragmaDirectiveTrivia = Trivia(pragmaDirective); 244return Trivia(newPragmaWarning);
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
169var nullableDisableTrivia = SyntaxFactory.Trivia(SyntaxFactory.NullableDirectiveTrivia(DisableKeyword.WithPrependedLeadingTrivia(SyntaxFactory.ElasticSpace), isActive: true));
DecompiledSource\CSharpDecompiledSourceService.cs (2)
84SyntaxFactory.Trivia(regionTrivia), 90SyntaxFactory.Trivia(SyntaxFactory.EndRegionDirectiveTrivia(true)),
MetadataAsSource\CSharpMetadataAsSourceService.cs (3)
47Trivia(regionTrivia), 51Trivia(EndRegionDirectiveTrivia(true)), 143Trivia(NullableDirectiveTrivia(Token(keyword), isActive: enable)),
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (1)
253return Trivia((StructuredTriviaSyntax)rewritten);
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (1)
119Trivia(singleLineInheritdocComment));
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
680.Append(Trivia(newClassDocComment)) 687.Replace(classDocComment.Value, Trivia(newClassDocComment))
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (2)
158return Trivia(DocumentationCommentTrivia( 220Trivia(DocumentationCommentTrivia(SyntaxKind.SingleLineDocumentationCommentTrivia, [.. allContent])));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Syntax\StructuredTriviaTests.cs (2)
24var trivia1 = SyntaxFactory.Trivia(SyntaxFactory.IfDirectiveTrivia(SyntaxFactory.IdentifierName(conditionName), false, false, false)); 65var sTrivia = SyntaxFactory.Trivia(docComment);
Syntax\SyntaxNodeTests.cs (7)
1382var trivia = SyntaxFactory.Trivia(def); 1946? [SyntaxFactory.Trivia(zeroWidth), SyntaxFactory.Trivia(zeroWidth)] 1947: SyntaxFactory.TriviaList(SyntaxFactory.Trivia(zeroWidth), SyntaxFactory.Trivia(zeroWidth))); 1984var someToken = SyntaxFactory.Identifier(default(SyntaxTriviaList), "", SyntaxFactory.TriviaList(SyntaxFactory.Trivia(zeroWidth), SyntaxFactory.Trivia(zeroWidth)));
Syntax\SyntaxNormalizerTests.cs (2)
3597SyntaxFactory.Trivia( 3600SyntaxFactory.Trivia(
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
72return SyntaxFactory.Trivia(structuredTriviaSyntax);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (2)
338var formattedTrivia = SyntaxFactory.Trivia((StructuredTriviaSyntax)result.GetFormattedRoot(cancellationToken)); 372var formattedTrivia = SyntaxFactory.Trivia((StructuredTriviaSyntax)result.GetFormattedRoot(cancellationToken));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
124return Trivia(updatedSyntax);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Formatting\FormattingElasticTriviaTests.cs (1)
51[Trivia(