1 implementation of IVariableDeclarationGroupOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
4056internal sealed partial class VariableDeclarationGroupOperation : Operation, IVariableDeclarationGroupOperation
51 references to IVariableDeclarationGroupOperation
Microsoft.Analyzers.Extra (2)
AsyncCallInsideUsingBlockAnalyzer.cs (2)
62if (operation.Resources is not IVariableDeclarationGroupOperation declarationGroup) 145private static ILocalSymbol GetDisposableSymbol(IVariableDeclarationGroupOperation declarationGroup)
Microsoft.CodeAnalysis (16)
Generated\OperationKind.Generated.cs (1)
23/// <summary>Indicates an <see cref="IVariableDeclarationGroupOperation"/>.</summary>
Generated\Operations.Generated.cs (10)
2523/// All <see cref="IVariableDeclarationGroupOperation" /> will have at least 1 <see cref="IVariableDeclarationOperation" />, 3375IVariableDeclarationGroupOperation Variables { get; } 3481IVariableDeclarationGroupOperation DeclarationGroup { get; } 9586internal FixedOperation(ImmutableArray<ILocalSymbol> locals, IVariableDeclarationGroupOperation variables, IOperation body, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9594public IVariableDeclarationGroupOperation Variables { get; } 9783internal UsingDeclarationOperation(IVariableDeclarationGroupOperation declarationGroup, bool isAsynchronous, DisposeOperationInfo disposeInfo, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 9790public IVariableDeclarationGroupOperation DeclarationGroup { get; } 10801public override IOperation VisitVariableDeclarationGroup(IVariableDeclarationGroupOperation operation, object? argument) 11417public virtual void VisitVariableDeclarationGroup(IVariableDeclarationGroupOperation operation) => DefaultVisit(operation); 11556public virtual TResult? VisitVariableDeclarationGroup(IVariableDeclarationGroupOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (4)
1427/// Either visits a single operation, or a using <see cref="IVariableDeclarationGroupOperation"/> and all subsequent statements 3965if (resources is IVariableDeclarationGroupOperation declarationGroup) 5789public override IOperation? VisitVariableDeclarationGroup(IVariableDeclarationGroupOperation operation, int? captureIdForResult) 5799private void HandleVariableDeclarations(IVariableDeclarationGroupOperation operation)
Operations\OperationExtensions.cs (1)
128public static ImmutableArray<ILocalSymbol> GetDeclaredVariables(this IVariableDeclarationGroupOperation declarationGroup)
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
132if (statements.First() is not IVariableDeclarationGroupOperation varDeclStatement ||
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
920var localDeclarationOperation = (IVariableDeclarationGroupOperation)semanticModel.GetRequiredOperation(declStatement, cancellationToken);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (3)
127out var localDeclarationOperation, out var declarator)) 155[NotNullWhen(true)] out IVariableDeclarationGroupOperation? localDeclaration, 198localDeclaration = parentBlock.Operations[ifIndex - 1] as IVariableDeclarationGroupOperation;
Microsoft.CodeAnalysis.CSharp (2)
Operations\CSharpOperationFactory.cs (2)
2021IVariableDeclarationGroupOperation variables = (IVariableDeclarationGroupOperation)Create(boundFixedStatement.Declarations);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
572if (operation is IVariableDeclarationGroupOperation
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
572if (operation is IVariableDeclarationGroupOperation
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (6)
IOperation\IOperationTests_IAnonymousFunctionExpression.cs (4)
412var variableDeclarationGroupOperation = (IVariableDeclarationGroupOperation)semanticModel.GetOperation(variableDeclaration); 420var variableDeclarationGroupOperationSecondRequest = (IVariableDeclarationGroupOperation)semanticModel.GetOperation(variableDeclaration);
IOperation\IOperationTests_IConversionExpression.cs (2)
5335((IVariableDeclarationGroupOperation)operation).Declarations.Single().Initializer; 5421case IVariableDeclarationGroupOperation _:
Microsoft.CodeAnalysis.Features (8)
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (2)
109var operation = semanticModel.GetOperation(declarationSyntax, cancellationToken) as IVariableDeclarationGroupOperation;
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
132if (statements.First() is not IVariableDeclarationGroupOperation varDeclStatement ||
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
920var localDeclarationOperation = (IVariableDeclarationGroupOperation)semanticModel.GetRequiredOperation(declStatement, cancellationToken);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (3)
127out var localDeclarationOperation, out var declarator)) 155[NotNullWhen(true)] out IVariableDeclarationGroupOperation? localDeclaration, 198localDeclaration = parentBlock.Operations[ifIndex - 1] as IVariableDeclarationGroupOperation;
Microsoft.CodeAnalysis.Test.Utilities (7)
Compilation\OperationTreeVerifier.cs (2)
458public override void VisitVariableDeclarationGroup(IVariableDeclarationGroupOperation operation) 461LogString($"{nameof(IVariableDeclarationGroupOperation)} ({variablesCountStr})");
Compilation\TestOperationVisitor.cs (1)
125public override void VisitVariableDeclarationGroup(IVariableDeclarationGroupOperation operation)
Diagnostics\LocalCouldBeConstAnalyzer.cs (2)
82IVariableDeclarationGroupOperation declaration = (IVariableDeclarationGroupOperation)operationContext.Operation;
Diagnostics\OperationTestAnalyzer.cs (2)
842var declarationStatement = (IVariableDeclarationGroupOperation)operationContext.Operation;
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (2)
IOperation\IOperationTests_IConversionExpression.vb (2)
2599Dim initializer As IVariableInitializerOperation = DirectCast(operation, IVariableDeclarationGroupOperation).Declarations.Single().Initializer 3401Return DirectCast(operation, IVariableDeclarationGroupOperation).Declarations.Single().Initializer.Value