1 write to _localDeclarationStatement
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
128
_localDeclarationStatement
= localDeclarationStatement;
9 references to _localDeclarationStatement
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (9)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (9)
158
foreach (var variable in
_localDeclarationStatement
.Declaration.Variables)
192
var leadingTrivia =
_localDeclarationStatement
.Declaration.Type.GetLeadingTrivia()
193
.Concat(
_localDeclarationStatement
.Declaration.Type.GetTrailingTrivia());
199
var trailingTrivia =
_localDeclarationStatement
.SemicolonToken.GetAllTrivia();
204
if (
_localDeclarationStatement
.Parent is BlockSyntax or SwitchSectionSyntax)
208
_editor.InsertAfter(
_localDeclarationStatement
, _statementsBuilder.Skip(1));
211
_editor.ReplaceNode(
_localDeclarationStatement
, _statementsBuilder[0]);
215
_editor.ReplaceNode(
_localDeclarationStatement
, Block(_statementsBuilder));
229
VariableDeclaration(
_localDeclarationStatement
.Declaration.Type, _currentNonDiscardVariables))