Delen via


SyntaxNodeExtensions.NormalizeWhitespace Method

Definition

Overloads

NormalizeWhitespace<TNode>(TNode, String, Boolean)

Creates a new syntax node with all whitespace and end of line trivia replaced with regularly formatted trivia.

NormalizeWhitespace<TNode>(TNode, String, String, Boolean)

Creates a new syntax node with all whitespace and end of line trivia replaced with regularly formatted trivia.

NormalizeWhitespace<TNode>(TNode, String, Boolean)

Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs

Creates a new syntax node with all whitespace and end of line trivia replaced with regularly formatted trivia.

public:
generic <typename TNode>
 where TNode : Microsoft::CodeAnalysis::SyntaxNode[System::Runtime::CompilerServices::Extension]
 static TNode NormalizeWhitespace(TNode node, System::String ^ indentation, bool elasticTrivia);
public static TNode NormalizeWhitespace<TNode> (this TNode node, string indentation, bool elasticTrivia) where TNode : Microsoft.CodeAnalysis.SyntaxNode;
static member NormalizeWhitespace : 'Node * string * bool -> 'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)
<Extension()>
Public Function NormalizeWhitespace(Of TNode As SyntaxNode) (node As TNode, indentation As String, elasticTrivia As Boolean) As TNode

Type Parameters

TNode

The type of the node.

Parameters

node
TNode

The node to format.

indentation
String

A sequence of whitespace characters that defines a single level of indentation.

elasticTrivia
Boolean

If true the replaced trivia is elastic trivia.

Returns

TNode

Applies to

NormalizeWhitespace<TNode>(TNode, String, String, Boolean)

Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs
Source:
SyntaxNodeExtensions.cs

Creates a new syntax node with all whitespace and end of line trivia replaced with regularly formatted trivia.

public static TNode NormalizeWhitespace<TNode> (this TNode node, string indentation = "    ", string eol = "\r\n", bool elasticTrivia = false) where TNode : Microsoft.CodeAnalysis.SyntaxNode;
static member NormalizeWhitespace : 'Node * string * string * bool -> 'Node (requires 'Node :> Microsoft.CodeAnalysis.SyntaxNode)
<Extension()>
Public Function NormalizeWhitespace(Of TNode As SyntaxNode) (node As TNode, Optional indentation As String = "    ", Optional eol As String = "\r\n", Optional elasticTrivia As Boolean = false) As TNode

Type Parameters

TNode

The type of the node.

Parameters

node
TNode

The node to format.

indentation
String

An optional sequence of whitespace characters that defines a single level of indentation.

eol
String

An optional sequence of whitespace characters used for end of line.

elasticTrivia
Boolean

If true the replaced trivia is elastic trivia.

Returns

TNode

Applies to