31 references to Whitespace
Microsoft.CodeAnalysis.CSharp (4)
Syntax\SyntaxFactory.cs (3)
753.WithLeadingTrivia(Whitespace(" ")); 786.WithLeadingTrivia(Whitespace(" ")); 1067.WithLeadingTrivia(Whitespace(" "));
Syntax\SyntaxNormalizer.cs (1)
166_indentations.Add(_useElasticTrivia ? SyntaxFactory.ElasticWhitespace(text) : SyntaxFactory.Whitespace(text));
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
50=> SyntaxFactory.Whitespace(text);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (4)
300initialCollection.CloseBracketToken.WithLeadingTrivia(endOfLine, Whitespace(braceIndentation))); 334elementsWithSeparators = elementsWithSeparators.Replace(first, first.WithLeadingTrivia(endOfLine, Whitespace(preferredItemIndentation))); 561return currentToken.WithLeadingTrivia(Whitespace(preferredIndentation)); 681newLeadingTrivia.Add(Whitespace(preferredIndentation));
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\CSharpUseObjectInitializerCodeFixProvider.cs (1)
47=> SyntaxFactory.Whitespace(text);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
365leadingTrivia.Take(leadingTrivia.Count - 1).Concat(Whitespace(elementLeadingWhitespace[..^indentation.Length])));
Microsoft.CodeAnalysis.CSharp.Features (7)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (5)
300initialCollection.CloseBracketToken.WithLeadingTrivia(endOfLine, Whitespace(braceIndentation))); 334elementsWithSeparators = elementsWithSeparators.Replace(first, first.WithLeadingTrivia(endOfLine, Whitespace(preferredItemIndentation))); 561return currentToken.WithLeadingTrivia(Whitespace(preferredIndentation)); 646return Whitespace(positionIndentation.StartsWith(firstTokenOnLineIndentationString) 681newLeadingTrivia.Add(Whitespace(preferredIndentation));
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\CSharpUseObjectInitializerCodeFixProvider.cs (1)
47=> SyntaxFactory.Whitespace(text);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
365leadingTrivia.Take(leadingTrivia.Count - 1).Concat(Whitespace(elementLeadingWhitespace[..^indentation.Length])));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (9)
Diagnostics\LocationsTests.cs (1)
554var node = SyntaxFactory.IdentifierName(SyntaxFactory.Identifier(SyntaxFactory.TriviaList(SyntaxFactory.Whitespace(" ")), "x", default(SyntaxTriviaList)));
Syntax\StructuredTriviaTests.cs (1)
35var spaceTrivia = SyntaxTriviaListBuilder.Create().Add(SyntaxFactory.Whitespace(" ")).ToList();
Syntax\SyntaxNodeTests.cs (7)
2357var expr2 = expr.ReplaceToken(token, SyntaxFactory.Token(SyntaxTriviaList.Create(SyntaxFactory.Whitespace("garbage")), token.Kind(), default(SyntaxTriviaList))); 2370var cu2 = cu.ReplaceToken(token, SyntaxFactory.Token(SyntaxTriviaList.Create(SyntaxFactory.Whitespace(" ")), token.Kind(), default(SyntaxTriviaList))); 2385var twoSpace = SyntaxFactory.Whitespace(" "); 2396var twoSpaces = SyntaxFactory.Whitespace(" "); 2405var twoSpaces = SyntaxFactory.Whitespace(" "); 2457var twoSpace = SyntaxFactory.Whitespace(" "); 3599var emptyWhitespace = SyntaxFactory.Whitespace("");
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
49=> SyntaxFactory.Whitespace(text);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
50=> SyntaxFactory.Whitespace(text);
Microsoft.CodeAnalysis.UnitTests (1)
CommonSyntaxTests.cs (1)
89SyntaxTrivia trivia = CSharp.SyntaxFactory.Whitespace("test");
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionTests.cs (1)
3997var newRoot = root.WithLeadingTrivia(root.GetLeadingTrivia().Add(CS.SyntaxFactory.Whitespace(" ")));