80 references to Replace
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (2)
67var textWithOpenParenthesis = text.Replace(openParenthesisPosition, 0, "("); 117var textWithCloseParenthesis = sourceText.Replace(closeParenPosition, 0, ")");
Microsoft.CodeAnalysis.CSharp.Features (2)
CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (2)
67var textWithOpenParenthesis = text.Replace(openParenthesisPosition, 0, "("); 117var textWithCloseParenthesis = sourceText.Replace(closeParenPosition, 0, ")");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
LinkedFiles\LinkedFileDiffMergingEditorTests.cs (4)
65.WithDocumentText(documentId, text.Replace(13, 1, "D")) 66.WithDocumentText(linkedDocumentId, linkedText.Replace(0, 6, "private")); 86.WithDocumentText(document.Id, (await document.GetTextAsync()).Replace(13, 1, "D")) 87.WithDocumentText(linkedDocument.Id, (await linkedDocument.GetTextAsync()).Replace(0, 6, "private"));
Microsoft.CodeAnalysis.UnitTests (10)
Text\TextChangeTests.cs (10)
65var newText = text.Replace(6, 0, "Beautiful "); 73var newText = text.Replace(6, 0, "Beautiful "); 356text = text.Replace(50 + i, 0, c.ToString()); 376text = text.Replace(i, 1, c.ToString()); 491t = t.Replace(t.Length, 0, b); // add b's 502t = t.Replace(t.Length, 0, "c"); 521t = t.Replace(t.Length, 0, b); // add b's 532t = t.Replace(t.Length, 0, c); // add c's that are the same segment size as the a's and b's 565var firstEdit = text.Replace(11, 3, "new"); 566secondEdit = firstEdit.Replace(11, 3, "newer");
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\GetSemanticInfoBrokenCodeTests.vb (2)
113Dim newText = oldText.Replace(start:=0, length:=0, newText:="B") 140Dim newText = oldText.Replace(start:=position, length:=1, newText:="m")
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (47)
IncrementalParser\IncrementalParser.vb (47)
868Dim newText = oldText.Replace(start:=0, length:=0, newText:="B") 888Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:=str) 909Dim newText = oldText.Replace(start:=position, length:=1, newText:="m") 938Dim newText = oldText.Replace(start:=position, length:=5, newText:="True") 967Dim newText = oldText.Replace(start:=position, length:=1, newText:="m") 991Dim newText = oldText.Replace(start:=position, length:=0, newText:=vbCrLf) 1012Dim newText = oldText.Replace(start:=position, length:=1, newText:="") 1032Dim newText = oldText.Replace(start:=position, length:=1, newText:="") 1056Dim newText = oldText.Replace(start:=position, length:=0, newText:=vbCrLf & "Class") 1082Dim newText = oldText.Replace(start:=position + str.Length, length:=0, newText:=vbCrLf) 1108Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:=String.Empty) 1269Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:="") 1293Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:="") 1317Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:="Async Function ") 1341Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:="Async Function ") 1364Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:="") 1387Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:="Async Function ") 1407Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:="") 1427Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:="Iterator Function ") 1447Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:="") 1467Dim newText = oldText.Replace(start:=position, length:=str.Length, newText:="Iterator Function ") 1491Dim newText = oldText.Replace(start:=position, length:=0, newText:=vbCrLf) 1586Dim newText = oldText.Replace(start:=position + "&HFFFFFFFFFF:".Length, length:=0, newText:=vbCrLf) 1771Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 1798Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 1827Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 1847Dim newText = oldText.Replace(start:=position, length:=1, newText:=TextToAdd) 1866Dim newText = oldText.Replace(start:=position, length:=1, newText:=TextToAdd) 1891Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 1924Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 1958Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 1988Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2019Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2051Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2081Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2113Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2215Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2247Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2281Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2307Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2338Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2371Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2408Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2436Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2470Dim newText = oldText.Replace(start:=position, length:=TextToRemove.Length, newText:=TextToAdd) 2495Dim newText = oldText.Replace(start:=position, length:=0, newText:="Delegate") 2549Dim newText = oldText.Replace(start:=position, length:=toReplace.Length, newText:="Property")
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
SolutionTests\ProjectSemanticVersionTests.cs (12)
48document.WithText(text.Replace(position, length: 0, "public async Task M() { }")).Project); 62document.WithText(text.Replace(position, length: 0, "int x = 10;")).Project); 76document.WithText(text.Replace(position, length: 0, "int x = 10")).Project); 90document.WithText(text.Replace(position, length: 0, " \r\n")).Project); 104document.WithText(text.Replace(position, length: 0, "public int X = 20;")).Project); 132document.WithText(text.Replace(position, length: 0, "public const int X = 20;")).Project); 160document.WithText(text.Replace(position, length: 0, "Public Sub M()\r\nEnd Sub")).Project); 174document.WithText(text.Replace(position, length: 0, "Dim x As Integer = 10")).Project); 188document.WithText(text.Replace(position, length: 0, "Optional x As Integer = 10")).Project); 202document.WithText(text.Replace(position, length: 0, " \r\n")).Project); 216document.WithText(text.Replace(position, length: 0, "Public X As Integer = 20")).Project); 244document.WithText(text.Replace(position, length: 0, "Public Const X As Integer = 20")).Project);
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\VisualBasicCodeModelService.vb (1)
4081text = text.Replace(position, 0, textToInsert)