1 implementation of IVariableInitializerOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
7559internal sealed partial class VariableInitializerOperation : BaseSymbolInitializerOperation, IVariableInitializerOperation
36 references to IVariableInitializerOperation
ILLink.RoslynAnalyzer (1)
IOperationExtensions.cs (1)
160 } else if (operation.Parent is IVariableInitializerOperation variableInitializerOperation) {
Microsoft.CodeAnalysis (12)
Generated\OperationKind.Generated.cs (1)
169/// <summary>Indicates an <see cref="IVariableInitializerOperation"/>.</summary>
Generated\Operations.Generated.cs (9)
2486IVariableInitializerOperation? Initializer { get; } 2533IVariableInitializerOperation? Initializer { get; } 7765internal VariableDeclaratorOperation(ILocalSymbol symbol, IVariableInitializerOperation? initializer, ImmutableArray<IOperation> ignoredArguments, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7773public IVariableInitializerOperation? Initializer { get; } 7833internal VariableDeclarationOperation(ImmutableArray<IVariableDeclaratorOperation> declarators, IVariableInitializerOperation? initializer, ImmutableArray<IOperation> ignoredDimensions, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7841public IVariableInitializerOperation? Initializer { get; } 11126public override IOperation VisitVariableInitializer(IVariableInitializerOperation operation, object? argument) 11487public virtual void VisitVariableInitializer(IVariableInitializerOperation operation) => DefaultVisit(operation); 11626public virtual TResult? VisitVariableInitializer(IVariableInitializerOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (1)
5901public override IOperation VisitVariableInitializer(IVariableInitializerOperation operation, int? captureIdForResult)
Operations\OperationExtensions.cs (1)
173public static IVariableInitializerOperation? GetVariableInitializer(this IVariableDeclaratorOperation declarationOperation)
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
265if (operation.Parent is IVariableInitializerOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
212else if (operation.Parent is IVariableInitializerOperation variableInitializerOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
270var variableInitializer = operation.GetVariableInitializer();
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
229var variableInitializer = declarator.Initializer ?? declaration.Initializer;
Microsoft.CodeAnalysis.CSharp (2)
Operations\CSharpOperationFactory_Methods.cs (2)
52internal IVariableInitializerOperation? CreateVariableDeclaratorInitializer(BoundLocalDeclaration boundLocalDeclaration, SyntaxNode syntax) 86IVariableInitializerOperation? initializer = CreateVariableDeclaratorInitializer(boundLocalDeclaration, syntax);
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.Features (3)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
265if (operation.Parent is IVariableInitializerOperation)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
229var variableInitializer = declarator.Initializer ?? declaration.Initializer;
ValueTracking\ValueTracker.cs (1)
310var initializer = declarator.GetVariableInitializer();
Microsoft.CodeAnalysis.Test.Utilities (9)
Compilation\OperationTreeVerifier.cs (2)
1555public override void VisitVariableInitializer(IVariableInitializerOperation operation) 1557LogString(nameof(IVariableInitializerOperation));
Compilation\TestOperationVisitor.cs (3)
136var initializer = operation.Initializer; 150var initializer = operation.Initializer; 1112public override void VisitVariableInitializer(IVariableInitializerOperation operation)
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (2)
102IVariableInitializerOperation initializer = (IVariableInitializerOperation)operationContext.Operation;
Diagnostics\LocalCouldBeConstAnalyzer.cs (1)
91IVariableInitializerOperation initializer = variable.GetVariableInitializer();
Diagnostics\OperationTestAnalyzer.cs (1)
850var initializer = decl.GetVariableInitializer();
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
212else if (operation.Parent is IVariableInitializerOperation variableInitializerOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
270var variableInitializer = operation.GetVariableInitializer();
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (1)
IOperation\IOperationTests_IConversionExpression.vb (1)
2599Dim initializer As IVariableInitializerOperation = DirectCast(operation, IVariableDeclarationGroupOperation).Declarations.Single().Initializer