10 references to Replace
Microsoft.CodeAnalysis (2)
Syntax\SeparatedSyntaxList.cs (2)
524
return new SeparatedSyntaxList<TNode>(this.GetWithSeparators().
Replace
(nodeInList, newNode));
585
return new SeparatedSyntaxList<TNode>(nodesWithSeps.
Replace
(separatorToken, newSeparator));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
330
elementsWithSeparators = elementsWithSeparators.
Replace
(first, first.WithLeadingTrivia(endOfLine, Whitespace(preferredItemIndentation)));
332
elementsWithSeparators = elementsWithSeparators.
Replace
(last, RemoveTrailingWhitespace(last));
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
330
elementsWithSeparators = elementsWithSeparators.
Replace
(first, first.WithLeadingTrivia(endOfLine, Whitespace(preferredItemIndentation)));
332
elementsWithSeparators = elementsWithSeparators.
Replace
(last, RemoveTrailingWhitespace(last));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Syntax\SyntaxNodeOrTokenListTests.cs (4)
121
newList = list.
Replace
(elementA, tokenD);
125
newList = list.
Replace
(elementB, tokenD);
129
newList = list.
Replace
(elementC, tokenD);
164
Assert.Throws<ArgumentOutOfRangeException>(() => list.
Replace
(tokenD, nameE));