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)
26976Assert.Equal(2, context.OperationBlocks.Length); 26978Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 26979Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 26981Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 26982Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 26987Assert.Equal(3, context.OperationBlocks.Length); 26989Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 26990Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 26992Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 26993Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 26995Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind); 26996Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 27001Assert.Equal(4, context.OperationBlocks.Length); 27003Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27004Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 27006Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27007Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 27009Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind); 27011Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind); 27012Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 27017Assert.Equal(1, context.OperationBlocks.Length); 27018Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind); 27184Assert.Equal(2, context.OperationBlocks.Length); 27186Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27187Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 27189Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27190Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 27195Assert.Equal(3, context.OperationBlocks.Length); 27197Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27198Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 27200Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27201Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 27203Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind); 27204Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 27209Assert.Equal(4, context.OperationBlocks.Length); 27211Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27212Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 27214Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27215Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 27217Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind); 27219Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind); 27220Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 27225Assert.Equal(1, context.OperationBlocks.Length); 27226Assert.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