70 references to NormalizeWhitespace
Microsoft.AspNetCore.App.CodeFixes (1)
WebApplicationBuilderFixer.cs (1)
111.NormalizeWhitespace().WithLeadingTrivia(indentation);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
103finalizer = finalizer.NormalizeWhitespace();
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\Providers\OutVariableArgumentProvider.cs (1)
62context.DefaultValue = syntax.NormalizeWhitespace().ToFullString();
Snippets\AbstractCSharpForLoopSnippetProvider.cs (1)
60.NormalizeWhitespace();
Snippets\CSharpConstructorSnippetProvider.cs (1)
75return new TextChange(TextSpan.FromBounds(position, position), constructorDeclaration.NormalizeWhitespace().ToFullString());
Snippets\CSharpForEachLoopSnippetProvider.cs (1)
105return forEachStatement.NormalizeWhitespace();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\RecordStructTests.cs (1)
10651AssertEx.AssertEqualToleratingWhitespaceDifferences(expected, SyntaxFactory.TypeDeclaration(SyntaxKind.RecordStructDeclaration, "Point").NormalizeWhitespace().ToString());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (19)
Syntax\SyntaxFactoryTests.cs (10)
115Assert.Equal("#pragma checksum \"file\" \"guid\" \"bytes\"\r\n", t.NormalizeWhitespace().ToFullString()); 499.NormalizeWhitespace(); 522.NormalizeWhitespace(); 532var syntaxNode = SyntaxFactory.ParseExpression("x is int? y: z").NormalizeWhitespace(); 537var syntaxNode2 = SyntaxFactory.ParseExpression("x is DateTime? y: z").NormalizeWhitespace(); 547var syntaxNode = SyntaxFactory.ParseExpression("x is int??y").NormalizeWhitespace(); 550var syntaxNode2 = SyntaxFactory.ParseExpression("x is DateTime??y").NormalizeWhitespace(); 553var syntaxNode3 = SyntaxFactory.ParseExpression("x is object??y").NormalizeWhitespace(); 606Assert.Equal("record R;", record.NormalizeWhitespace().ToFullString()); 618Assert.Equal("record R\r\n{\r\n private int i;\r\n}", record.NormalizeWhitespace().ToFullString());
Syntax\SyntaxNormalizerTests.cs (8)
413var actual = node.NormalizeWhitespace(" ").ToFullString(); 942var actual = node.NormalizeWhitespace(" ").ToFullString(); 3410var actual = node.NormalizeWhitespace(" ").ToFullString(); 3798var actual = SyntaxFactory.ParseCompilationUnit(code).NormalizeWhitespace(indentation: " ", eol: "\n").ToFullString(); 3814var actual = SyntaxFactory.ParseCompilationUnit(code).NormalizeWhitespace(indentation: " ").ToFullString(); 3980var actual = node.NormalizeWhitespace(" ").ToFullString(); 5966var syntaxNode = SyntaxFactory.ParseStatement(expression).NormalizeWhitespace(); 5979var syntaxNode = SyntaxFactory.ParseExpression(expression).NormalizeWhitespace();
Syntax\SyntaxRewriterTests.cs (1)
529var newRoot = root.NormalizeWhitespace(" ");
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\SyntaxGeneratorTests.cs (4)
51var normalized = node.NormalizeWhitespace().ToFullString(); 1352.NormalizeWhitespace(), 1376.NormalizeWhitespace(), 1463.NormalizeWhitespace(),
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
CodeGeneration\AbstractCodeGenerationTests.cs (5)
34var normalizedSyntax = syntaxNode.NormalizeWhitespace().ToFullString(); 84node = node.NormalizeWhitespace(); 96TokenUtilities.AssertTokensEqual(csSimple, expression.NormalizeWhitespace().ToFullString(), LanguageNames.CSharp); 105node = node.NormalizeWhitespace(); 117TokenUtilities.AssertTokensEqual(vbSimple, expression.NormalizeWhitespace().ToFullString(), LanguageNames.VisualBasic);
Microsoft.CodeAnalysis.Features (5)
Snippets\SnippetProviders\AbstractLockSnippetProvider.cs (1)
19return Task.FromResult(new TextChange(TextSpan.FromBounds(position, position), statement.NormalizeWhitespace().ToFullString()));
Snippets\SnippetProviders\AbstractMainMethodSnippetProvider.cs (1)
36return Task.FromResult(new TextChange(TextSpan.FromBounds(position, position), method.NormalizeWhitespace().ToFullString()));
Snippets\SnippetProviders\AbstractPropertySnippetProvider.cs (1)
24return new TextChange(TextSpan.FromBounds(position, position), propertyDeclaration.NormalizeWhitespace().ToFullString());
Snippets\SnippetProviders\AbstractTypeSnippetProvider.cs (1)
25var mainChange = new TextChange(TextSpan.FromBounds(position, position), typeDeclaration.NormalizeWhitespace().ToFullString());
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
103finalizer = finalizer.NormalizeWhitespace();
Microsoft.CodeAnalysis.UnitTests (2)
CommonSyntaxTests.cs (2)
219trackedExpr = trackedExpr.NormalizeWhitespace(); 242trackedExpr = trackedExpr.NormalizeWhitespace();
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (10)
Syntax\ManualTests.vb (1)
38Dim actualText = c.NormalizeWhitespace().ToFullString()
Syntax\SyntaxFactoryTests.vb (1)
41})).NormalizeWhitespace()
Syntax\SyntaxNormalizerTests.vb (7)
27Dim actual = node.NormalizeWhitespace(" ").ToFullString() 79Dim actual = node.NormalizeWhitespace(" ").ToFullString() 543Dim str = mlib.NormalizeWhitespace(" ").ToFullString() 694Dim actual = node.NormalizeWhitespace(" ").ToFullString() 723Dim actual = node.NormalizeWhitespace(" ").ToFullString() 750Dim actual = node.NormalizeWhitespace(" ").ToFullString() 756Dim actual = node.NormalizeWhitespace(" ").ToFullString()
Syntax\SyntaxRewriterTests.vb (1)
699Dim newRoot = root.NormalizeWhitespace(" ")
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (1)
161asClauseOpt = SyntaxFactory.SimpleAsClause(typeSyntax).NormalizeWhitespace()
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (1)
328Dim parsableStatementText = node.NormalizeWhitespace().ToString()
Simplification\Reducers\VisualBasicMiscellaneousReducer.vb (1)
35Dim newParameter = parameter.WithAsClause(Nothing).NormalizeWhitespace()
Simplification\VisualBasicSimplificationService.Expander.vb (1)
111Dim asClause = SyntaxFactory.SimpleAsClause(typeSyntax).NormalizeWhitespace()
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (5)
CodeGeneration\SyntaxGeneratorTests.vb (1)
43Dim normalized = type.NormalizeWhitespace().ToFullString()
Formatting\FormattingTests.vb (4)
3777root = root.ReplaceNode(implementsStatement, implementsStatement.NormalizeWhitespace(elasticTrivia:=True).WithAdditionalAnnotations(goo)) 3780root = root.ReplaceNode(field, field.NormalizeWhitespace(elasticTrivia:=True).WithAdditionalAnnotations(goo)) 3782root = root.ReplaceNode(prop, prop.NormalizeWhitespace(elasticTrivia:=True).WithAdditionalAnnotations(goo)) 3785root = root.ReplaceNode(method, method.NormalizeWhitespace(elasticTrivia:=True).WithAdditionalAnnotations(goo))
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SyntaxNodeTests.cs (1)
124Assert.Equal("public class C\r\n{\r\n private int X;\r\n void M()\r\n {\r\n }\r\n}", finalClassDecl.NormalizeWhitespace().ToString());
Microsoft.Interop.ComInterfaceGenerator (2)
ComClassGenerator.cs (2)
44.Select(static (info, ct) => GenerateClassInfoType(info.ImplementedInterfacesNames.Array).NormalizeWhitespace()); 48.Select(static (info, ct) => GenerateClassInfoAttributeOnUserType(info.ContainingSyntaxContext, info.ClassSyntax).NormalizeWhitespace());
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSExportGenerator.cs (2)
103.Select(static (data, ct) => data.NormalizeWhitespace().ToFullString()); 108static (data, ct) => (data.Left.Item1.NormalizeWhitespace().ToFullString(), data.Right))
Microsoft.Interop.SourceGeneration (2)
IncrementalGeneratorInitializationContextExtensions.cs (1)
74static (node, ct) => node.NormalizeWhitespace().ToFullString())
IncrementalValuesProviderExtensions.cs (1)
47return provider.Select((node, ct) => node.NormalizeWhitespace());
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
142.NormalizeWhitespace()
System.Windows.Forms.Analyzers.CodeFixes.VisualBasic (1)
AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.vb (1)
158NormalizeWhitespace().