9 references to _state
Microsoft.CodeAnalysis.CodeStyle.Fixes (9)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (9)
33
_state
.IdentifierToken.ValueText);
49
if (_service.TryConvertToLocalDeclaration(
_state
.LocalType,
_state
.IdentifierToken, semanticModel, cancellationToken, out var newRoot))
55
var initializer =
_state
.IsOnlyWrittenTo
57
: syntaxFactory.DefaultExpression(
_state
.LocalType);
59
var type =
_state
.LocalType;
60
var localStatement = syntaxFactory.LocalDeclarationStatement(type,
_state
.IdentifierToken.ValueText, initializer);
63
var root =
_state
.IdentifierToken.GetAncestors<SyntaxNode>().Last();
64
var context = new CodeGenerationContext(beforeThisLocation:
_state
.IdentifierToken.GetLocation());