20 references to Replace
Microsoft.CodeAnalysis (1)
Text\SourceText.cs (1)
874return this.Replace(new TextSpan(start, length), newText);
Microsoft.CodeAnalysis.Analyzers (1)
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.cs (1)
434return unshippedText.Replace(new TextSpan(0, unshippedText.Length), builder.ToString());
Microsoft.CodeAnalysis.Features (1)
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
161var newText = text.Replace(span, replacement);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
MapCode\MapCodeTests.cs (1)
38var newText = text.Replace(focusLocations.Single().Item2, contents.Single());
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (3)
AnnotatePublicApiFix.cs (1)
99SourceText newSourceText = sourceText.Replace(new TextSpan(0, sourceText.Length), string.Join(endOfLine, lines) + sourceText.GetEndOfFileText(endOfLine));
DeclarePublicApiFix.cs (2)
146return sourceText?.Replace(new TextSpan(0, sourceText.Length), newText) ?? SourceText.From(newText); 175SourceText newSourceText = sourceText.Replace(new TextSpan(0, sourceText.Length), string.Join(endOfLine, newLines) + sourceText.GetEndOfFileText(endOfLine));
Microsoft.CodeAnalysis.UnitTests (7)
Text\TextChangeTests.cs (7)
426var newText = text.Replace(new TextSpan(0, 20), ""); 437var newText = text.Replace(new TextSpan(10, 6), ""); 449var newText = text.Replace(new TextSpan(10, 1), ""); 465var textWithSegments = text.Replace(new TextSpan(10, 0), "*"); 482var textWithSegments = text.Replace(new TextSpan(10, 0), "*"); 486var textWithFewerSegments = textWithSegments.Replace(new TextSpan(9, 3), ""); 502var textWithSegments = text.Replace(new TextSpan(0, text.Length), "");
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);