Share via


Formatter.GetFormattedTextChanges Method

Definition

Overloads

GetFormattedTextChanges(SyntaxNode, Workspace, OptionSet, CancellationToken)

Determines the changes necessary to format the whitespace of a syntax tree.

GetFormattedTextChanges(SyntaxNode, TextSpan, Workspace, OptionSet, CancellationToken)

Determines the changes necessary to format the whitespace of a syntax tree.

GetFormattedTextChanges(SyntaxNode, IEnumerable<TextSpan>, Workspace, OptionSet, CancellationToken)

Determines the changes necessary to format the whitespace of a syntax tree.

GetFormattedTextChanges(SyntaxNode, Workspace, OptionSet, CancellationToken)

Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs

Determines the changes necessary to format the whitespace of a syntax tree.

public static System.Collections.Generic.IList<Microsoft.CodeAnalysis.Text.TextChange> GetFormattedTextChanges (Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.Workspace workspace, Microsoft.CodeAnalysis.Options.OptionSet options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Collections.Generic.IList<Microsoft.CodeAnalysis.Text.TextChange> GetFormattedTextChanges (Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.Workspace workspace, Microsoft.CodeAnalysis.Options.OptionSet? options = default, System.Threading.CancellationToken cancellationToken = default);
static member GetFormattedTextChanges : Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.Workspace * Microsoft.CodeAnalysis.Options.OptionSet * System.Threading.CancellationToken -> System.Collections.Generic.IList<Microsoft.CodeAnalysis.Text.TextChange>
Public Shared Function GetFormattedTextChanges (node As SyntaxNode, workspace As Workspace, Optional options As OptionSet = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IList(Of TextChange)

Parameters

node
SyntaxNode

The root node of a syntax tree to format.

workspace
Workspace

A workspace used to give the formatting context.

options
OptionSet

An optional set of formatting options. If these options are not supplied the current set of options from the workspace will be used.

cancellationToken
CancellationToken

An optional cancellation token.

Returns

The changes necessary to format the tree.

Applies to

GetFormattedTextChanges(SyntaxNode, TextSpan, Workspace, OptionSet, CancellationToken)

Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs

Determines the changes necessary to format the whitespace of a syntax tree.

public static System.Collections.Generic.IList<Microsoft.CodeAnalysis.Text.TextChange> GetFormattedTextChanges (Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.Text.TextSpan span, Microsoft.CodeAnalysis.Workspace workspace, Microsoft.CodeAnalysis.Options.OptionSet options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Collections.Generic.IList<Microsoft.CodeAnalysis.Text.TextChange> GetFormattedTextChanges (Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.Text.TextSpan span, Microsoft.CodeAnalysis.Workspace workspace, Microsoft.CodeAnalysis.Options.OptionSet? options = default, System.Threading.CancellationToken cancellationToken = default);
static member GetFormattedTextChanges : Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.Text.TextSpan * Microsoft.CodeAnalysis.Workspace * Microsoft.CodeAnalysis.Options.OptionSet * System.Threading.CancellationToken -> System.Collections.Generic.IList<Microsoft.CodeAnalysis.Text.TextChange>
Public Shared Function GetFormattedTextChanges (node As SyntaxNode, span As TextSpan, workspace As Workspace, Optional options As OptionSet = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IList(Of TextChange)

Parameters

node
SyntaxNode

The root node of a syntax tree to format.

span
TextSpan

The span within the node's full span to format.

workspace
Workspace

A workspace used to give the formatting context.

options
OptionSet

An optional set of formatting options. If these options are not supplied the current set of options from the workspace will be used.

cancellationToken
CancellationToken

An optional cancellation token.

Returns

The changes necessary to format the tree.

Applies to

GetFormattedTextChanges(SyntaxNode, IEnumerable<TextSpan>, Workspace, OptionSet, CancellationToken)

Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs
Source:
Formatter.cs

Determines the changes necessary to format the whitespace of a syntax tree.

public static System.Collections.Generic.IList<Microsoft.CodeAnalysis.Text.TextChange> GetFormattedTextChanges (Microsoft.CodeAnalysis.SyntaxNode node, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Text.TextSpan> spans, Microsoft.CodeAnalysis.Workspace workspace, Microsoft.CodeAnalysis.Options.OptionSet options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Collections.Generic.IList<Microsoft.CodeAnalysis.Text.TextChange> GetFormattedTextChanges (Microsoft.CodeAnalysis.SyntaxNode node, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Text.TextSpan>? spans, Microsoft.CodeAnalysis.Workspace workspace, Microsoft.CodeAnalysis.Options.OptionSet? options = default, System.Threading.CancellationToken cancellationToken = default);
static member GetFormattedTextChanges : Microsoft.CodeAnalysis.SyntaxNode * seq<Microsoft.CodeAnalysis.Text.TextSpan> * Microsoft.CodeAnalysis.Workspace * Microsoft.CodeAnalysis.Options.OptionSet * System.Threading.CancellationToken -> System.Collections.Generic.IList<Microsoft.CodeAnalysis.Text.TextChange>
Public Shared Function GetFormattedTextChanges (node As SyntaxNode, spans As IEnumerable(Of TextSpan), workspace As Workspace, Optional options As OptionSet = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IList(Of TextChange)

Parameters

node
SyntaxNode

The root node of a syntax tree to format.

spans
IEnumerable<TextSpan>

The spans within the node's full span to format.

workspace
Workspace

A workspace used to give the formatting context.

options
OptionSet

An optional set of formatting options. If these options are not supplied the current set of options from the workspace will be used.

cancellationToken
CancellationToken

An optional cancellation token.

Returns

The changes necessary to format the tree.

Applies to