123 references to OperationBlocks
ILLink.RoslynAnalyzer (1)
DynamicallyAccessedMembersAnalyzer.cs (1)
103 foreach (var operationBlock in context.OperationBlocks) {
Microsoft.CodeAnalysis (6)
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (6)
1394/// <see cref="ISymbol"/> for which the <see cref="OperationBlocks"/> provides a definition or value. 1399/// <see cref="CodeAnalysis.Compilation"/> containing the <see cref="OperationBlocks"/>. 1409/// Syntax tree for the <see cref="OperationBlocks"/> being analyzed. 1421/// Indicates if the <see cref="OperationBlocks"/> is generated code. 1484/// Gets a <see cref="ControlFlowGraph"/> for a given <paramref name="operationBlock"/> from this analysis context's <see cref="OperationBlocks"/>. 1494if (!OperationBlocks.Contains(operationBlock))
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
490foreach (var operationBlock in context.OperationBlocks)
src\Analyzers\Core\Analyzers\UseSystemHashCode\UseSystemHashCodeDiagnosticAnalyzer.cs (2)
42if (context.OperationBlocks.Length != 1) 50var operation = context.OperationBlocks[0];
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
146foreach (var blockOperation in context.OperationBlocks)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (94)
Diagnostics\GetDiagnosticsTests.cs (1)
988foreach (var operationBlock in blockEndContext.OperationBlocks)
Semantics\PrimaryConstructorTests.cs (49)
4513Assert.Equal(2, context.OperationBlocks.Length); 4515Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 4516Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 4518Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 4519Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 4524Assert.Equal(3, context.OperationBlocks.Length); 4526Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 4527Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 4529Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 4530Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 4532Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind); 4533Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 4538Assert.Equal(4, context.OperationBlocks.Length); 4540Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 4541Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 4543Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 4544Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 4546Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind); 4548Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind); 4549Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 4554Assert.Equal(1, context.OperationBlocks.Length); 4555Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind); 4721Assert.Equal(2, context.OperationBlocks.Length); 4723Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 4724Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 4726Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 4727Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 4732Assert.Equal(3, context.OperationBlocks.Length); 4734Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 4735Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 4737Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 4738Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 4740Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind); 4741Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 4746Assert.Equal(4, context.OperationBlocks.Length); 4748Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 4749Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 4751Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 4752Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 4754Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind); 4756Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind); 4757Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 4762Assert.Equal(1, context.OperationBlocks.Length); 4763Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind); 5788Assert.Equal(2, context.OperationBlocks.Length); 5790Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 5791Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 5793Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 5794Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString());
Semantics\RecordTests.cs (44)
27021Assert.Equal(2, context.OperationBlocks.Length); 27023Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27024Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 27026Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27027Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 27032Assert.Equal(3, context.OperationBlocks.Length); 27034Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27035Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 27037Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27038Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 27040Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind); 27041Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 27046Assert.Equal(4, context.OperationBlocks.Length); 27048Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27049Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 27051Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27052Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 27054Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind); 27056Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind); 27057Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 27062Assert.Equal(1, context.OperationBlocks.Length); 27063Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind); 27229Assert.Equal(2, context.OperationBlocks.Length); 27231Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27232Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 27234Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27235Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 27240Assert.Equal(3, context.OperationBlocks.Length); 27242Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27243Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 27245Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27246Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 27248Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind); 27249Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 27254Assert.Equal(4, context.OperationBlocks.Length); 27256Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27257Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 27259Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27260Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 27262Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind); 27264Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind); 27265Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 27270Assert.Equal(1, context.OperationBlocks.Length); 27271Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
146foreach (var blockOperation in context.OperationBlocks)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (9)
Semantics\RecordStructTests.cs (5)
6514Assert.Equal(2, context.OperationBlocks.Length); 6516Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 6517Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 6519Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 6520Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString());
Semantics\TopLevelStatementsTests.cs (4)
6801Assert.Equal(SyntaxKind.CompilationUnit, context.OperationBlocks.Single().Syntax.Kind()); 6803switch (context.OperationBlocks.Single().Syntax.ToString()) 7353Assert.Equal(SyntaxKind.CompilationUnit, context.OperationBlocks.Single().Syntax.Kind()); 7355switch (context.OperationBlocks.Single().Syntax.ToString())
Microsoft.CodeAnalysis.Features (3)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
490foreach (var operationBlock in context.OperationBlocks)
src\Analyzers\Core\Analyzers\UseSystemHashCode\UseSystemHashCodeDiagnosticAnalyzer.cs (2)
42if (context.OperationBlocks.Length != 1) 50var operation = context.OperationBlocks[0];
Microsoft.CodeAnalysis.Test.Utilities (4)
Diagnostics\CommonDiagnosticAnalyzers.cs (4)
1345CacheAndVerifyControlFlowGraph(blockContext.OperationBlocks, op => (blockContext.GetControlFlowGraph(op), blockContext.OwningSymbol)); 1390foreach (var operationRoot in c.OperationBlocks) 1423foreach (var operationBlock in operationBlockAnalysisContext.OperationBlocks) 1592context.OperationBlocks.IsEmpty)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Diagnostics\GetDiagnosticsTests.vb (1)
645For Each operationBlock In context.OperationBlocks