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"/>. 1361if (!OperationBlocks.Contains(operationBlock))
Microsoft.CodeAnalysis.CodeStyle (4)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (4)
87if (HasSyntaxErrors() || context.OperationBlocks.IsEmpty) 98var firstBlock = context.OperationBlocks[0]; 138foreach (var operationBlock in context.OperationBlocks) 149foreach (var operationBlock in context.OperationBlocks)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (44)
Semantics\PrimaryConstructorTests.cs (22)
4647Assert.Equal(2, context.OperationBlocks.Length); 4649Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 4650Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 4652Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 4653Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 4660Assert.Equal(3, context.OperationBlocks.Length); 4662Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 4663Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 4665Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 4666Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 4668Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind); 4669Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 4676Assert.Equal(4, context.OperationBlocks.Length); 4678Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 4679Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 4681Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 4682Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 4684Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind); 4686Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind); 4687Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 4694Assert.Equal(1, context.OperationBlocks.Length); 4695Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind);
Semantics\RecordTests.cs (22)
27155Assert.Equal(2, context.OperationBlocks.Length); 27157Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27158Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 27160Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27161Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 27168Assert.Equal(3, context.OperationBlocks.Length); 27170Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27171Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 27173Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27174Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 27176Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind); 27177Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 27184Assert.Equal(4, context.OperationBlocks.Length); 27186Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind); 27187Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 27189Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind); 27190Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 27192Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind); 27194Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind); 27195Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 27202Assert.Equal(1, context.OperationBlocks.Length); 27203Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\TopLevelStatementsTests.cs (2)
6859Assert.Equal(SyntaxKind.CompilationUnit, context.OperationBlocks.Single().Syntax.Kind()); 6861switch (context.OperationBlocks.Single().Syntax.ToString())
Microsoft.CodeAnalysis.Features (4)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (4)
87if (HasSyntaxErrors() || context.OperationBlocks.IsEmpty) 98var firstBlock = context.OperationBlocks[0]; 138foreach (var operationBlock in context.OperationBlocks) 149foreach (var operationBlock in context.OperationBlocks)
Microsoft.CodeAnalysis.Test.Utilities (3)
Diagnostics\CommonDiagnosticAnalyzers.cs (3)
1336CacheAndVerifyControlFlowGraph(blockStartContext.OperationBlocks, op => (blockStartContext.GetControlFlowGraph(op), blockStartContext.OwningSymbol)); 1362CacheAndVerifyControlFlowGraph(blockContext.OperationBlocks, op => (blockContext.GetControlFlowGraph(op), blockContext.OwningSymbol)); 1574context.OperationBlocks.IsEmpty)