1 write to Kind
Microsoft.CodeAnalysis (1)
Operations\ControlFlowRegion.cs (1)
74Kind = kind;
107 references to Kind
Microsoft.CodeAnalysis (28)
Operations\ControlFlowBranch.cs (4)
88Debug.Assert(source.Kind != ControlFlowRegionKind.Root); 142if (leavingRegions[i].Kind == ControlFlowRegionKind.Try && leavingRegions[i + 1].Kind == ControlFlowRegionKind.TryAndFinally) 150Debug.Assert(builder.Last().Kind == ControlFlowRegionKind.Finally);
Operations\ControlFlowGraph.cs (1)
46Debug.Assert(root.Kind == ControlFlowRegionKind.Root);
Operations\ControlFlowGraphBuilder.cs (17)
349Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 352if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 355Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 372Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 407ControlFlowRegion? enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 408if (fromRegion.Kind == ControlFlowRegionKind.Try) 410switch (enclosing!.Kind) 414Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 428throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 431else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 434Debug.Assert(enclosing!.Kind == ControlFlowRegionKind.FilterAndHandler); 437Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 461Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 469switch (@catch.Kind) 477Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 484throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
Operations\ControlFlowRegion.cs (6)
86Debug.Assert(r.EnclosingRegion == null && r.Kind != ControlFlowRegionKind.Root); 97Debug.Assert(NestedRegions[0].Kind == (kind == ControlFlowRegionKind.TryAndFinally ? ControlFlowRegionKind.Try : ControlFlowRegionKind.Filter)); 98Debug.Assert(NestedRegions[1].Kind == (kind == ControlFlowRegionKind.TryAndFinally ? ControlFlowRegionKind.Finally : ControlFlowRegionKind.Catch)); 106Debug.Assert(NestedRegions[0].Kind == ControlFlowRegionKind.Try); 116Debug.Assert(r.Kind == ControlFlowRegionKind.FilterAndHandler || r.Kind == ControlFlowRegionKind.Catch);
Microsoft.CodeAnalysis.CodeStyle (23)
CustomDataFlowAnalysis.cs (18)
176if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 258Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 260if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 263Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 280Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 319var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 320if (fromRegion.Kind == ControlFlowRegionKind.Try) 322switch (enclosing.Kind) 326Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 342throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 345else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 348Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 350Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 374Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 382switch (@catch.Kind) 390Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 397throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
OperationExtensions.cs (1)
307switch (currentRegion.Kind)
SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
368switch (outermostEnclosingRegionStartingBlock.Kind) 385switch (currentRegion.Kind)
Microsoft.CodeAnalysis.Test.Utilities (33)
Compilation\ControlFlowGraphVerifier.cs (15)
151Assert.Equal(ControlFlowRegionKind.Root, currentRegion.Kind); 297Assert.True(block.EnclosingRegion.Kind == ControlFlowRegionKind.Filter || block.EnclosingRegion.Kind == ControlFlowRegionKind.Finally); 772while (region.Kind != ControlFlowRegionKind.Root) 774if (region.Kind == ControlFlowRegionKind.Try && region.EnclosingRegion.Kind == ControlFlowRegionKind.TryAndFinally) 776Debug.Assert(region.EnclosingRegion.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 1456switch (region.Kind) 1478switch (region.EnclosingRegion.Kind) 1488Assert.False(true, $"Unexpected region kind {region.EnclosingRegion.Kind}"); 1518Assert.False(true, $"Unexpected region kind {region.Kind}"); 1554switch (region.Kind) 1567switch (region.EnclosingRegion.Kind) 1574Assert.False(true, $"Unexpected region kind {region.EnclosingRegion.Kind}"); 1587Assert.False(true, $"Unexpected region kind {region.Kind}");
CustomDataFlowAnalysis.cs (18)
176if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 258Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 260if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 263Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 280Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 319var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 320if (fromRegion.Kind == ControlFlowRegionKind.Try) 322switch (enclosing.Kind) 326Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 342throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 345else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 348Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 350Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 374Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 382switch (@catch.Kind) 390Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 397throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
Microsoft.CodeAnalysis.Workspaces (23)
CustomDataFlowAnalysis.cs (18)
176if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 258Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 260if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 263Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 280Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 319var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 320if (fromRegion.Kind == ControlFlowRegionKind.Try) 322switch (enclosing.Kind) 326Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 342throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 345else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 348Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 350Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 374Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 382switch (@catch.Kind) 390Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 397throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
OperationExtensions.cs (1)
307switch (currentRegion.Kind)
SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
368switch (outermostEnclosingRegionStartingBlock.Kind) 385switch (currentRegion.Kind)