1 implementation of Initializer
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
7773public IVariableInitializerOperation? Initializer { get; }
19 references to Initializer
Microsoft.CodeAnalysis (4)
Operations\ControlFlowGraphBuilder.cs (3)
5819if (declarator.Initializer == null && declaration.Initializer == null) 5844if (declarator.Initializer != null) 5846initializer = Visit(declarator.Initializer.Value);
Operations\OperationExtensions.cs (1)
180return declarationOperation.Initializer ?? (declarationOperation.Parent as IVariableDeclarationOperation)?.Initializer;
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
152var initializerValue = declaration.Initializer?.Value ?? declarator.Initializer?.Value;
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
229var variableInitializer = declarator.Initializer ?? declaration.Initializer;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
580Initializer: IVariableInitializerOperation
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
580Initializer: IVariableInitializerOperation
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (5)
IOperation\IOperationTests_IAnonymousFunctionExpression.cs (2)
413var variableTreeLambdaOperation = ((IDelegateCreationOperation)variableDeclarationGroupOperation.Declarations.Single().Declarators.Single().Initializer.Value).Target; 421var variableTreeLambdaOperationSecondRequest = ((IDelegateCreationOperation)variableDeclarationGroupOperationSecondRequest.Declarations.Single().Declarators.Single().Initializer.Value).Target;
IOperation\IOperationTests_IConversionExpression.cs (3)
182var initializerOperation = ((IVariableDeclaratorOperation)operation).Initializer.Value; 380var initializer = ((IVariableDeclaratorOperation)operation).Initializer.Value; 5341((IVariableDeclaratorOperation)operation).Initializer.Value;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\DelegateTypeTests.cs (1)
14756var value = ((IConversionOperation)operation.Initializer!.Value).Operand;
Microsoft.CodeAnalysis.Features (3)
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (1)
123var initializer = (localDeclaration.Initializer ?? declarator.Initializer)?.Value;
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
152var initializerValue = declaration.Initializer?.Value ?? declarator.Initializer?.Value;
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
229var variableInitializer = declarator.Initializer ?? declaration.Initializer;
Microsoft.CodeAnalysis.Test.Utilities (2)
Compilation\OperationTreeVerifier.cs (1)
495Visit(operation.Initializer, "Initializer");
Compilation\TestOperationVisitor.cs (1)
136var initializer = operation.Initializer;