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