SyntaxExtensions.NormalizeWhitespace Method

Definition

Overloads

NormalizeWhitespace(SyntaxToken, String, Boolean)

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

NormalizeWhitespace(SyntaxTriviaList, String, Boolean)

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

NormalizeWhitespace(SyntaxToken, String, String, Boolean)

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

NormalizeWhitespace(SyntaxTriviaList, String, String, Boolean)

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

NormalizeWhitespace(SyntaxToken, String, Boolean)

Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs

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

C#
public static Microsoft.CodeAnalysis.SyntaxToken NormalizeWhitespace(this Microsoft.CodeAnalysis.SyntaxToken token, string indentation, bool elasticTrivia);

Parameters

token
SyntaxToken

The token to normalize.

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

Applies to

Roslyn 4.13.0 and other versions
Product Versions
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0

NormalizeWhitespace(SyntaxTriviaList, String, Boolean)

Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs

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

C#
public static Microsoft.CodeAnalysis.SyntaxTriviaList NormalizeWhitespace(this Microsoft.CodeAnalysis.SyntaxTriviaList list, string indentation, bool elasticTrivia);

Parameters

list
SyntaxTriviaList

The trivia list to normalize.

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

Applies to

Roslyn 4.13.0 and other versions
Product Versions
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0

NormalizeWhitespace(SyntaxToken, String, String, Boolean)

Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs

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

C#
public static Microsoft.CodeAnalysis.SyntaxToken NormalizeWhitespace(this Microsoft.CodeAnalysis.SyntaxToken token, string indentation = "    ", string eol = "\r\n", bool elasticTrivia = false);

Parameters

token
SyntaxToken

The token to normalize.

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

Applies to

Roslyn 4.13.0 and other versions
Product Versions
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0

NormalizeWhitespace(SyntaxTriviaList, String, String, Boolean)

Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs
Source:
SyntaxExtensions.cs

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

C#
public static Microsoft.CodeAnalysis.SyntaxTriviaList NormalizeWhitespace(this Microsoft.CodeAnalysis.SyntaxTriviaList list, string indentation = "    ", string eol = "\r\n", bool elasticTrivia = false);

Parameters

list
SyntaxTriviaList

The trivia list to normalize.

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

Applies to

Roslyn 4.13.0 and other versions
Product Versions
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0