8 references to Replace
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (1)
127
return leadingTrivia.
Replace
(existingDocComment, newDocComment);
Microsoft.CodeAnalysis.CSharp.Features (2)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider_DocumentationComments.cs (1)
74
return typeDeclaration.WithLeadingTrivia(triviaList.
Replace
(trivia, updatedTrivia));
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (1)
127
return leadingTrivia.
Replace
(existingDocComment, newDocComment);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Syntax\SyntaxTriviaListTests.cs (4)
132
newList = list.
Replace
(elementA, triviaD);
136
newList = list.
Replace
(elementB, triviaD);
140
newList = list.
Replace
(elementC, triviaD);
221
Assert.Throws<ArgumentOutOfRangeException>(() => list.
Replace
(triviaD, triviaE));
Microsoft.CodeAnalysis.Features (1)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
191
triviaList = triviaList.
Replace
(triviaToToggle, toggledTrivia);