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