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