63 references to OperationBlocks
Microsoft.CodeAnalysis (6)
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (6)
1252
/// <see cref="ISymbol"/> for which the <see cref="
OperationBlocks
"/> provides a definition or value.
1257
/// <see cref="CodeAnalysis.Compilation"/> containing the <see cref="
OperationBlocks
"/>.
1267
/// Syntax tree for the <see cref="
OperationBlocks
"/> being analyzed.
1279
/// Indicates if the <see cref="
OperationBlocks
"/> is generated code.
1351
/// Gets a <see cref="ControlFlowGraph"/> for a given <paramref name="operationBlock"/> from this analysis context's <see cref="
OperationBlocks
"/>.
1361
if (!
OperationBlocks
.Contains(operationBlock))
Microsoft.CodeAnalysis.CodeStyle (4)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (4)
87
if (HasSyntaxErrors() || context.
OperationBlocks
.IsEmpty)
98
var firstBlock = context.
OperationBlocks
[0];
138
foreach (var operationBlock in context.
OperationBlocks
)
149
foreach (var operationBlock in context.
OperationBlocks
)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (44)
Semantics\PrimaryConstructorTests.cs (22)
4647
Assert.Equal(2, context.
OperationBlocks
.Length);
4649
Assert.Equal(OperationKind.ParameterInitializer, context.
OperationBlocks
[0].Kind);
4650
Assert.Equal("= 0", context.
OperationBlocks
[0].Syntax.ToString());
4652
Assert.Equal(OperationKind.Attribute, context.
OperationBlocks
[1].Kind);
4653
Assert.Equal("Attr1(100)", context.
OperationBlocks
[1].Syntax.ToString());
4660
Assert.Equal(3, context.
OperationBlocks
.Length);
4662
Assert.Equal(OperationKind.ParameterInitializer, context.
OperationBlocks
[0].Kind);
4663
Assert.Equal("= 1", context.
OperationBlocks
[0].Syntax.ToString());
4665
Assert.Equal(OperationKind.Attribute, context.
OperationBlocks
[1].Kind);
4666
Assert.Equal("Attr2(200)", context.
OperationBlocks
[1].Syntax.ToString());
4668
Assert.Equal(OperationKind.Invocation, context.
OperationBlocks
[2].Kind);
4669
Assert.Equal("A(2)", context.
OperationBlocks
[2].Syntax.ToString());
4676
Assert.Equal(4, context.
OperationBlocks
.Length);
4678
Assert.Equal(OperationKind.ParameterInitializer, context.
OperationBlocks
[0].Kind);
4679
Assert.Equal("= 4", context.
OperationBlocks
[0].Syntax.ToString());
4681
Assert.Equal(OperationKind.Attribute, context.
OperationBlocks
[1].Kind);
4682
Assert.Equal("Attr3(300)", context.
OperationBlocks
[1].Syntax.ToString());
4684
Assert.Equal(OperationKind.Block, context.
OperationBlocks
[2].Kind);
4686
Assert.Equal(OperationKind.Invocation, context.
OperationBlocks
[3].Kind);
4687
Assert.Equal(": base(5)", context.
OperationBlocks
[3].Syntax.ToString());
4694
Assert.Equal(1, context.
OperationBlocks
.Length);
4695
Assert.Equal(OperationKind.Block, context.
OperationBlocks
[0].Kind);
Semantics\RecordTests.cs (22)
27155
Assert.Equal(2, context.
OperationBlocks
.Length);
27157
Assert.Equal(OperationKind.ParameterInitializer, context.
OperationBlocks
[0].Kind);
27158
Assert.Equal("= 0", context.
OperationBlocks
[0].Syntax.ToString());
27160
Assert.Equal(OperationKind.Attribute, context.
OperationBlocks
[1].Kind);
27161
Assert.Equal("Attr1(100)", context.
OperationBlocks
[1].Syntax.ToString());
27168
Assert.Equal(3, context.
OperationBlocks
.Length);
27170
Assert.Equal(OperationKind.ParameterInitializer, context.
OperationBlocks
[0].Kind);
27171
Assert.Equal("= 1", context.
OperationBlocks
[0].Syntax.ToString());
27173
Assert.Equal(OperationKind.Attribute, context.
OperationBlocks
[1].Kind);
27174
Assert.Equal("Attr2(200)", context.
OperationBlocks
[1].Syntax.ToString());
27176
Assert.Equal(OperationKind.Invocation, context.
OperationBlocks
[2].Kind);
27177
Assert.Equal("A(2)", context.
OperationBlocks
[2].Syntax.ToString());
27184
Assert.Equal(4, context.
OperationBlocks
.Length);
27186
Assert.Equal(OperationKind.ParameterInitializer, context.
OperationBlocks
[0].Kind);
27187
Assert.Equal("= 4", context.
OperationBlocks
[0].Syntax.ToString());
27189
Assert.Equal(OperationKind.Attribute, context.
OperationBlocks
[1].Kind);
27190
Assert.Equal("Attr3(300)", context.
OperationBlocks
[1].Syntax.ToString());
27192
Assert.Equal(OperationKind.Block, context.
OperationBlocks
[2].Kind);
27194
Assert.Equal(OperationKind.Invocation, context.
OperationBlocks
[3].Kind);
27195
Assert.Equal(": base(5)", context.
OperationBlocks
[3].Syntax.ToString());
27202
Assert.Equal(1, context.
OperationBlocks
.Length);
27203
Assert.Equal(OperationKind.Block, context.
OperationBlocks
[0].Kind);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\TopLevelStatementsTests.cs (2)
6859
Assert.Equal(SyntaxKind.CompilationUnit, context.
OperationBlocks
.Single().Syntax.Kind());
6861
switch (context.
OperationBlocks
.Single().Syntax.ToString())
Microsoft.CodeAnalysis.Features (4)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (4)
87
if (HasSyntaxErrors() || context.
OperationBlocks
.IsEmpty)
98
var firstBlock = context.
OperationBlocks
[0];
138
foreach (var operationBlock in context.
OperationBlocks
)
149
foreach (var operationBlock in context.
OperationBlocks
)
Microsoft.CodeAnalysis.Test.Utilities (3)
Diagnostics\CommonDiagnosticAnalyzers.cs (3)
1336
CacheAndVerifyControlFlowGraph(blockStartContext.
OperationBlocks
, op => (blockStartContext.GetControlFlowGraph(op), blockStartContext.OwningSymbol));
1362
CacheAndVerifyControlFlowGraph(blockContext.
OperationBlocks
, op => (blockContext.GetControlFlowGraph(op), blockContext.OwningSymbol));
1574
context.
OperationBlocks
.IsEmpty)