22 references to Replace
Microsoft.CodeAnalysis (1)
Text\SourceText.cs (1)
869return this.Replace(new TextSpan(start, length), newText);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
174text = text.Replace(textSpan, edit.NewText);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
MapCode\MapCodeTests.cs (1)
38var newText = text.Replace(focusLocations.Single().Item2, contents.Single());
Microsoft.CodeAnalysis.UnitTests (7)
Text\TextChangeTests.cs (7)
403var newText = text.Replace(new TextSpan(0, 20), ""); 414var newText = text.Replace(new TextSpan(10, 6), ""); 426var newText = text.Replace(new TextSpan(10, 1), ""); 442var textWithSegments = text.Replace(new TextSpan(10, 0), "*"); 459var textWithSegments = text.Replace(new TextSpan(10, 0), "*"); 463var textWithFewerSegments = textWithSegments.Replace(new TextSpan(9, 3), ""); 479var textWithSegments = text.Replace(new TextSpan(0, text.Length), "");
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
IncrementalParser\IncrementalParser.vb (1)
1557Dim newText = oldText.Replace(TextSpan.FromBounds(startOfOld, endOfOld), newSource.Substring(startOfNew, endOfNew - startOfNew + 1))
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
SolutionTests\ProjectSemanticVersionTests.cs (4)
118document.WithText(text.Replace(span, "100")).Project); 146document.WithText(text.Replace(span, "100")).Project); 230document.WithText(text.Replace(span, "100")).Project); 258document.WithText(text.Replace(span, "100")).Project);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.cs (2)
2802text = text.Replace(TextSpan.FromBounds(deletionStart, deletionEnd), string.Empty); 2877text = text.Replace(TextSpan.FromBounds(deletionStart, deletionEnd), string.Empty);
Microsoft.VisualStudio.LanguageServices.VisualBasic (5)
CodeModel\VisualBasicCodeModelService.vb (5)
1301text = text.Replace(TextSpan.FromBounds(deletionStart, deletionEnd), String.Empty) 1360text = text.Replace(TextSpan.FromBounds(spanStart, spanEnd), String.Empty) 4127text = text.Replace(methodStatement.HandlesClause.Span, String.Empty) 4133text = text.Replace(TextSpan.FromBounds(clauseItemToRemove.SpanStart, methodStatement.HandlesClause.Events.GetSeparator(0).Span.End), String.Empty) 4135text = text.Replace(TextSpan.FromBounds(methodStatement.HandlesClause.Events.GetSeparator(index - 1).SpanStart, clauseItemToRemove.Span.End), String.Empty)