1 write to _statementsBuilder
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
131
_statementsBuilder
= ArrayBuilder<StatementSyntax>.GetInstance();
13 references to _statementsBuilder
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (13)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (13)
142
public void Dispose() =>
_statementsBuilder
.Free();
184
if (
_statementsBuilder
.Count == 0)
194
_statementsBuilder
[0] =
_statementsBuilder
[0].WithLeadingTrivia(leadingTrivia);
198
var last =
_statementsBuilder
.Count - 1;
200
_statementsBuilder
[last] =
_statementsBuilder
[last].WithTrailingTrivia(trailingTrivia);
206
if (
_statementsBuilder
.Count > 1)
208
_editor.InsertAfter(_localDeclarationStatement,
_statementsBuilder
.Skip(1));
211
_editor.ReplaceNode(_localDeclarationStatement,
_statementsBuilder
[0]);
215
_editor.ReplaceNode(_localDeclarationStatement, Block(
_statementsBuilder
));
231
_statementsBuilder
.Add(statement);
244
_statementsBuilder
.Add(