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