1 write to _localDeclarationStatement
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
134
_localDeclarationStatement
= localDeclarationStatement;
9 references to _localDeclarationStatement
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (9)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (9)
164
foreach (var variable in
_localDeclarationStatement
.Declaration.Variables)
198
var leadingTrivia =
_localDeclarationStatement
.Declaration.Type.GetLeadingTrivia()
199
.Concat(
_localDeclarationStatement
.Declaration.Type.GetTrailingTrivia());
205
var trailingTrivia =
_localDeclarationStatement
.SemicolonToken.GetAllTrivia();
210
if (
_localDeclarationStatement
.Parent is BlockSyntax or SwitchSectionSyntax)
214
_editor.InsertAfter(
_localDeclarationStatement
, _statementsBuilder.Skip(1));
217
_editor.ReplaceNode(
_localDeclarationStatement
, _statementsBuilder[0]);
221
_editor.ReplaceNode(
_localDeclarationStatement
, Block(_statementsBuilder));
235
VariableDeclaration(
_localDeclarationStatement
.Declaration.Type, _currentNonDiscardVariables))