45 references to ParentModel
Microsoft.CodeAnalysis (1)
Compilation\SemanticModel.cs (1)
242[MemberNotNullWhen(true, nameof(ParentModel))]
Microsoft.CodeAnalysis.CodeStyle (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (5)
109Contract.ThrowIfNull(semanticModel.ParentModel); 110Contract.ThrowIfTrue(semanticModel.ParentModel.IsSpeculativeSemanticModel); 111Contract.ThrowIfTrue(semanticModel.ParentModel.ParentModel != null); 112return semanticModel.ParentModel;
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (3)
128Debug.Assert(semanticModel.ParentModel != null); 129Debug.Assert(!semanticModel.ParentModel.IsSpeculativeSemanticModel); 131semanticModel = semanticModel.ParentModel;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
120semanticModel = semanticModel.ParentModel;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Compilation\SemanticModelAPITests.cs (8)
1415Assert.Null(model.ParentModel); 1429Assert.Equal(model, speculativeModel.ParentModel); 1674Assert.Null(model.ParentModel); 1688Assert.Equal(model, speculativeModel.ParentModel); 2021Assert.Null(model.ParentModel); 2039Assert.Equal(model, speculativeModel.ParentModel); 2699Assert.Null(model.ParentModel); 2709Assert.Equal(model, speculativeModel.ParentModel);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Simplification\Reducers\CSharpNullableAnnotationReducer.cs (1)
43context = semanticModel.ParentModel.GetNullableContext(semanticModel.OriginalPositionForSpeculation);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (3)
128Debug.Assert(semanticModel.ParentModel != null); 129Debug.Assert(!semanticModel.ParentModel.IsSpeculativeSemanticModel); 131semanticModel = semanticModel.ParentModel;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
120semanticModel = semanticModel.ParentModel;
Microsoft.CodeAnalysis.VisualBasic (3)
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (3)
184Debug.Assert(semanticModel.ParentModel IsNot Nothing) 185Debug.Assert(Not semanticModel.ParentModel.IsSpeculativeSemanticModel) 186Return semanticModel.ParentModel.SyntaxTree
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
133model = model.ParentModel
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\SpeculationAnalyzer.vb (3)
120Debug.Assert(semanticModel.ParentModel IsNot Nothing) 121Debug.Assert(Not semanticModel.ParentModel.IsSpeculativeSemanticModel) 123semanticModel = semanticModel.ParentModel
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (3)
Compilation\SemanticModelAPITests.vb (3)
611Assert.Equal(semanticModel, speculativeModel.ParentModel) 1716Assert.Null(model.ParentModel) 1726Assert.Equal(model, speculativeModel.ParentModel)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
Simplification\VisualBasicSimplificationService.vb (3)
101Debug.Assert(originalSemanticModel.ParentModel IsNot Nothing) 102Debug.Assert(Not originalSemanticModel.ParentModel.IsSpeculativeSemanticModel) 104originalSemanticModel = originalSemanticModel.ParentModel
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
133model = model.ParentModel
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\SpeculationAnalyzer.vb (3)
120Debug.Assert(semanticModel.ParentModel IsNot Nothing) 121Debug.Assert(Not semanticModel.ParentModel.IsSpeculativeSemanticModel) 123semanticModel = semanticModel.ParentModel
Microsoft.CodeAnalysis.Workspaces (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (5)
109Contract.ThrowIfNull(semanticModel.ParentModel); 110Contract.ThrowIfTrue(semanticModel.ParentModel.IsSpeculativeSemanticModel); 111Contract.ThrowIfTrue(semanticModel.ParentModel.ParentModel != null); 112return semanticModel.ParentModel;