Skip to main content

SyntaxExtensions.ReplaceRange Method

Containing Type: SyntaxExtensions

Assembly: Roslynator.CSharp.dll

Overloads

MethodSummary
ReplaceRange(SyntaxTokenList, Int32, Int32, IEnumerable<SyntaxToken>)Creates a new list with the tokens in the specified range replaced with new tokens.
ReplaceRange(SyntaxTriviaList, Int32, Int32, IEnumerable<SyntaxTrivia>)Creates a new list with the trivia in the specified range replaced with new trivia.
ReplaceRange<TNode>(SeparatedSyntaxList<TNode>, Int32, Int32, IEnumerable<TNode>)Creates a new list with the elements in the specified range replaced with new nodes.
ReplaceRange<TNode>(SeparatedSyntaxList<TNode>, Int32, Int32, TNode)Creates a new list with the elements in the specified range replaced with new node.
ReplaceRange<TNode>(SyntaxList<TNode>, Int32, Int32, IEnumerable<TNode>)Creates a new list with the elements in the specified range replaced with new nodes.
ReplaceRange<TNode>(SyntaxList<TNode>, Int32, Int32, TNode)Creates a new list with the elements in the specified range replaced with new node.

ReplaceRange(SyntaxTokenList, Int32, Int32, IEnumerable<SyntaxToken>)

Creates a new list with the tokens in the specified range replaced with new tokens.

public static Microsoft.CodeAnalysis.SyntaxTokenList ReplaceRange(this Microsoft.CodeAnalysis.SyntaxTokenList list, int index, int count, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> newTokens)

Parameters

list SyntaxTokenList

index Int32

count Int32

newTokens IEnumerable<SyntaxToken>

Returns

SyntaxTokenList

ReplaceRange(SyntaxTriviaList, Int32, Int32, IEnumerable<SyntaxTrivia>)

Creates a new list with the trivia in the specified range replaced with new trivia.

public static Microsoft.CodeAnalysis.SyntaxTriviaList ReplaceRange(this Microsoft.CodeAnalysis.SyntaxTriviaList list, int index, int count, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxTrivia> newTrivia)

Parameters

list SyntaxTriviaList

index Int32

count Int32

newTrivia IEnumerable<SyntaxTrivia>

Returns

SyntaxTriviaList

ReplaceRange<TNode>(SeparatedSyntaxList<TNode>, Int32, Int32, IEnumerable<TNode>)

Creates a new list with the elements in the specified range replaced with new nodes.

public static Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> ReplaceRange<TNode>(this Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> list, int index, int count, System.Collections.Generic.IEnumerable<TNode> newNodes) where TNode : Microsoft.CodeAnalysis.SyntaxNode

Type Parameters

TNode

Parameters

list SeparatedSyntaxList<TNode>

index Int32

count Int32

newNodes IEnumerable<TNode>

Returns

SeparatedSyntaxList<TNode>

ReplaceRange<TNode>(SeparatedSyntaxList<TNode>, Int32, Int32, TNode)

Creates a new list with the elements in the specified range replaced with new node.

public static Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> ReplaceRange<TNode>(this Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> list, int index, int count, TNode newNode) where TNode : Microsoft.CodeAnalysis.SyntaxNode

Type Parameters

TNode

Parameters

list SeparatedSyntaxList<TNode>

index Int32

count Int32

newNode TNode

Returns

SeparatedSyntaxList<TNode>

ReplaceRange<TNode>(SyntaxList<TNode>, Int32, Int32, IEnumerable<TNode>)

Creates a new list with the elements in the specified range replaced with new nodes.

public static Microsoft.CodeAnalysis.SyntaxList<TNode> ReplaceRange<TNode>(this Microsoft.CodeAnalysis.SyntaxList<TNode> list, int index, int count, System.Collections.Generic.IEnumerable<TNode> newNodes) where TNode : Microsoft.CodeAnalysis.SyntaxNode

Type Parameters

TNode

Parameters

list SyntaxList<TNode>

index Int32

count Int32

newNodes IEnumerable<TNode>

Returns

SyntaxList<TNode>

ReplaceRange<TNode>(SyntaxList<TNode>, Int32, Int32, TNode)

Creates a new list with the elements in the specified range replaced with new node.

public static Microsoft.CodeAnalysis.SyntaxList<TNode> ReplaceRange<TNode>(this Microsoft.CodeAnalysis.SyntaxList<TNode> list, int index, int count, TNode newNode) where TNode : Microsoft.CodeAnalysis.SyntaxNode

Type Parameters

TNode

Parameters

list SyntaxList<TNode>

index Int32

count Int32

newNode TNode

Returns

SyntaxList<TNode>