1 write to NestedRegions
Microsoft.CodeAnalysis (1)
Operations\ControlFlowRegion.cs (1)
81NestedRegions = nestedRegions.NullToEmpty();
130 references to NestedRegions
GenerateDocumentationAndConfigFiles (13)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (13)
262Debug.Assert(enclosing.NestedRegions[0] == region); 263Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 264if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 325Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 326Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 328if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 337Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 352var index = tryAndCatch.NestedRegions.IndexOf(enclosing, startIndex: 1); 376Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 378for (var i = startAt; i < tryAndCatch.NestedRegions.Length; i++) 380var @catch = tryAndCatch.NestedRegions[i]; 390Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 391Debug.Assert(entryBlock.Ordinal == @catch.NestedRegions[0].FirstBlockOrdinal);
ILLink.RoslynAnalyzer (3)
DataFlow\ControlFlowGraphProxy.cs (3)
178foreach (var nested in enclosingRegion.NestedRegions) 202foreach (var nested in tryRegion.Region.EnclosingRegion!.NestedRegions) 212foreach (var filter in nested.NestedRegions)
Microsoft.CodeAnalysis (29)
Operations\ControlFlowBranch.cs (1)
149builder.Add(leavingRegions[i + 1].NestedRegions.Last());
Operations\ControlFlowGraphBuilder.cs (13)
362Debug.Assert(enclosing.NestedRegions[0] == region); 363Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 364if (!stepThroughSingleFinally(enclosing.NestedRegions[1])) 421Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 422Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 423if (!stepThroughSingleFinally(enclosing.NestedRegions[1])) 431Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 447int index = tryAndCatch.NestedRegions.IndexOf(enclosing, startIndex: 1); 471Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 473for (int i = startAt; i < tryAndCatch.NestedRegions.Length; i++) 475ControlFlowRegion @catch = tryAndCatch.NestedRegions[i]; 485Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 486Debug.Assert(entryBlock.Ordinal == @catch.NestedRegions[0].FirstBlockOrdinal);
Operations\ControlFlowRegion.cs (15)
84foreach (ControlFlowRegion r in NestedRegions) 96Debug.Assert(NestedRegions.Length == 2); 97Debug.Assert(NestedRegions[0].Kind == (kind == ControlFlowRegionKind.TryAndFinally ? ControlFlowRegionKind.Try : ControlFlowRegionKind.Filter)); 98Debug.Assert(NestedRegions[1].Kind == (kind == ControlFlowRegionKind.TryAndFinally ? ControlFlowRegionKind.Finally : ControlFlowRegionKind.Catch)); 99Debug.Assert(NestedRegions[0].FirstBlockOrdinal == firstBlockOrdinal); 100Debug.Assert(NestedRegions[1].LastBlockOrdinal == lastBlockOrdinal); 101Debug.Assert(NestedRegions[0].LastBlockOrdinal + 1 == NestedRegions[1].FirstBlockOrdinal); 105Debug.Assert(NestedRegions.Length >= 2); 106Debug.Assert(NestedRegions[0].Kind == ControlFlowRegionKind.Try); 107Debug.Assert(NestedRegions[0].FirstBlockOrdinal == firstBlockOrdinal); 108previousLast = NestedRegions[0].LastBlockOrdinal; 110for (int i = 1; i < NestedRegions.Length; i++) 112ControlFlowRegion r = NestedRegions[i]; 132foreach (ControlFlowRegion r in NestedRegions)
Microsoft.CodeAnalysis.Analyzers (13)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (13)
262Debug.Assert(enclosing.NestedRegions[0] == region); 263Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 264if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 325Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 326Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 328if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 337Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 352var index = tryAndCatch.NestedRegions.IndexOf(enclosing, startIndex: 1); 376Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 378for (var i = startAt; i < tryAndCatch.NestedRegions.Length; i++) 380var @catch = tryAndCatch.NestedRegions[i]; 390Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 391Debug.Assert(entryBlock.Ordinal == @catch.NestedRegions[0].FirstBlockOrdinal);
Microsoft.CodeAnalysis.AnalyzerUtilities (20)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\BranchWithInfo.cs (1)
102foreach (var nestedRegion in region.NestedRegions)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysis.cs (3)
232var tryRegion = finallyRegion.EnclosingRegion.NestedRegions[0]; 351var finallyRegion = tryAndFinally.NestedRegions[1]; 497var catchRegion = tryAndCatchRegion.NestedRegions.FirstOrDefault(region => region.Kind is ControlFlowRegionKind.Catch or ControlFlowRegionKind.FilterAndHandler);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
3796var tryRegion = tryFinallyRegion.NestedRegions[0];
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\ThrownExceptionInfo.cs (2)
50Debug.Assert(enclosingRegion.NestedRegions[0].Kind == ControlFlowRegionKind.Try); 51foreach (var nestedRegion in enclosingRegion.NestedRegions.Skip(1))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (13)
262Debug.Assert(enclosing.NestedRegions[0] == region); 263Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 264if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 325Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 326Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 328if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 337Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 352var index = tryAndCatch.NestedRegions.IndexOf(enclosing, startIndex: 1); 376Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 378for (var i = startAt; i < tryAndCatch.NestedRegions.Length; i++) 380var @catch = tryAndCatch.NestedRegions[i]; 390Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 391Debug.Assert(entryBlock.Ordinal == @catch.NestedRegions[0].FirstBlockOrdinal);
Microsoft.CodeAnalysis.CodeStyle (13)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (13)
262Debug.Assert(enclosing.NestedRegions[0] == region); 263Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 264if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 325Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 326Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 328if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 337Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 352var index = tryAndCatch.NestedRegions.IndexOf(enclosing, startIndex: 1); 376Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 378for (var i = startAt; i < tryAndCatch.NestedRegions.Length; i++) 380var @catch = tryAndCatch.NestedRegions[i]; 390Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 391Debug.Assert(entryBlock.Ordinal == @catch.NestedRegions[0].FirstBlockOrdinal);
Microsoft.CodeAnalysis.ResxSourceGenerator (13)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (13)
262Debug.Assert(enclosing.NestedRegions[0] == region); 263Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 264if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 325Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 326Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 328if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 337Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 352var index = tryAndCatch.NestedRegions.IndexOf(enclosing, startIndex: 1); 376Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 378for (var i = startAt; i < tryAndCatch.NestedRegions.Length; i++) 380var @catch = tryAndCatch.NestedRegions[i]; 390Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 391Debug.Assert(entryBlock.Ordinal == @catch.NestedRegions[0].FirstBlockOrdinal);
Microsoft.CodeAnalysis.Workspaces (13)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (13)
262Debug.Assert(enclosing.NestedRegions[0] == region); 263Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 264if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 325Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 326Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 328if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 337Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 352var index = tryAndCatch.NestedRegions.IndexOf(enclosing, startIndex: 1); 376Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 378for (var i = startAt; i < tryAndCatch.NestedRegions.Length; i++) 380var @catch = tryAndCatch.NestedRegions[i]; 390Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 391Debug.Assert(entryBlock.Ordinal == @catch.NestedRegions[0].FirstBlockOrdinal);
Roslyn.Diagnostics.Analyzers (13)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (13)
262Debug.Assert(enclosing.NestedRegions[0] == region); 263Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 264if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 325Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 326Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 328if (!StepThroughSingleFinally(enclosing.NestedRegions[1], ref currentAnalysisData)) 337Debug.Assert(enclosing.NestedRegions[0] == fromRegion); 352var index = tryAndCatch.NestedRegions.IndexOf(enclosing, startIndex: 1); 376Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 378for (var i = startAt; i < tryAndCatch.NestedRegions.Length; i++) 380var @catch = tryAndCatch.NestedRegions[i]; 390Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 391Debug.Assert(entryBlock.Ordinal == @catch.NestedRegions[0].FirstBlockOrdinal);