15 references to Replace
Microsoft.CodeAnalysis (1)
Syntax\SeparatedSyntaxList.cs (1)
551var listWithFirstReplaced = this.Replace(nodeInList, newNodeList[0]);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
321typeList = typeList.Replace(baseRecord,
Microsoft.CodeAnalysis.CSharp.Features (2)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
432return node.WithTypes(node.Types.Replace(node.Types[0], primaryConstructorBase));
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
321typeList = typeList.Replace(baseRecord,
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Syntax\SeparatedSyntaxListTests.cs (4)
182newList = list.Replace(elementA, nodeD); 186newList = list.Replace(elementB, nodeD); 190newList = list.Replace(elementC, nodeD); 225Assert.Throws<ArgumentOutOfRangeException>(() => list.Replace(nodeD, nodeE));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Simplification\CSharpSimplificationService.Expander.cs (1)
191newParameters = newParameters.Replace(currentParameter, newParameter);
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (5)
Syntax\SeparatedSyntaxListTests.vb (5)
101newList = list.Replace(elementA, nodeD) 105newList = list.Replace(elementB, nodeD) 109newList = list.Replace(elementC, nodeD) 144Assert.Throws(Of ArgumentOutOfRangeException)(Function() list.Replace(nodeD, nodeE)) 190Assert.Throws(Of ArgumentOutOfRangeException)(Function() list.Replace(nodeD, nodeE))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
2648Return typeParameterList.WithParameters(typeParameterList.Parameters.Replace(typeParameter, typeParameter.WithTypeParameterConstraintClause(clause)))