Base:
property
ContainingType
Microsoft.CodeAnalysis.CSharp.Symbol.ContainingType
4 overrides of ContainingType
Microsoft.CodeAnalysis.CSharp (3)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
602public override NamedTypeSymbol ContainingType
Symbols\Source\SourceMemberContainerSymbol.cs (1)
734public sealed override NamedTypeSymbol? ContainingType
Symbols\SubstitutedNamedTypeSymbol.cs (1)
122public override NamedTypeSymbol ContainingType
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
Symbols\EENamedTypeSymbol.cs (1)
294public override NamedTypeSymbol ContainingType
128 references to ContainingType
Microsoft.CodeAnalysis.CSharp (99)
Binder\Binder_Crefs.cs (2)
607NamedTypeSymbol containing = type.ContainingType; 614containing = containing.ContainingType;
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1286for (NamedTypeSymbol curr = outerBinder.ContainingType; (object)curr != null; curr = curr.ContainingType)
Binder\RefSafetyAnalysis.cs (1)
70type = def.ContainingType;
Binder\Semantics\AccessCheck.cs (3)
246var containingType = type.ContainingType; 485current = current.ContainingType; 533current = current.ContainingType;
Compiler\ClsComplianceChecker.cs (3)
1063NamedTypeSymbol containingType = type.ContainingType; 1076containingType = containingType.ContainingType; 1099context = context.ContainingType;
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
164for (NamedTypeSymbol curr = containingSymbol.ContainingType; (object)curr != null; curr = curr.ContainingType)
Emitter\Model\GenericNestedTypeInstanceReference.cs (1)
25return ((PEModuleBuilder)context.Module).Translate(UnderlyingNamedType.ContainingType, syntaxNodeOpt: (CSharpSyntaxNode)context.SyntaxNode, diagnostics: context.Diagnostics);
Emitter\Model\NamedTypeSymbolAdapter.cs (12)
118(object)AdaptedNamedTypeSymbol.ContainingType == null) 133if ((object)AdaptedNamedTypeSymbol.ContainingType == null && 147if ((object)AdaptedNamedTypeSymbol.ContainingType != null) 167if ((object)AdaptedNamedTypeSymbol.ContainingType != null && 184(AdaptedNamedTypeSymbol.Arity == 0 || PEModuleBuilder.IsGenericType(AdaptedNamedTypeSymbol.ContainingType))) 186Debug.Assert((object)AdaptedNamedTypeSymbol.ContainingType != null && 187PEModuleBuilder.IsGenericType(AdaptedNamedTypeSymbol.ContainingType)); 813Debug.Assert((object)AdaptedNamedTypeSymbol.ContainingType == null && AdaptedNamedTypeSymbol.ContainingModule is SourceModuleSymbol); 827return moduleBeingBuilt.Translate(AdaptedNamedTypeSymbol.ContainingType, 837Debug.Assert((object)AdaptedNamedTypeSymbol.ContainingType != null); 840return AdaptedNamedTypeSymbol.ContainingType.GetCciAdapter(); 848Debug.Assert((object)AdaptedNamedTypeSymbol.ContainingType != null);
Emitter\Model\PEModuleBuilder.cs (4)
738Debug.Assert((object)originalDefinition.ContainingType == null, "How did a nested type get forwarded?"); 997NamedTypeSymbol container = namedTypeSymbol.ContainingType; 1102toCheck = toCheck.ContainingType; 1537AddSynthesizedDefinition(result.ContainingType, result.GetCciAdapter());
Emitter\Model\SpecializedNestedTypeReference.cs (1)
43return ((PEModuleBuilder)context.Module).Translate(UnderlyingNamedType.ContainingType, (CSharpSyntaxNode)context.SyntaxNode, context.Diagnostics);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
283if ((object)namedType.ContainingType != null)
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
350if (builderType.IsUnboundGenericType && builderType.ContainingType?.IsGenericType != true && builderType.Arity == 1)
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
153containingType = containingType.ContainingType;
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (2)
195if (type.ContainingType is null) 200type = type.ContainingType;
Symbols\AbstractTypeMap.cs (1)
28NamedTypeSymbol newContainingType = SubstituteNamedType(previous.ContainingType);
Symbols\AssemblySymbol.cs (2)
997Debug.Assert((object)result.ContainingType == null || IsValidWellKnownType(result.ContainingType),
Symbols\BaseTypeAnalysis.cs (1)
57TypeDependsClosure(type.ContainingType, currentCompilation, partialClosure);
Symbols\Compilation_WellKnownMembers.cs (2)
1078if ((object)named.ContainingType != null) 1092if ((object)named.ContainingType != null)
Symbols\ConstructedNamedTypeSymbol.cs (1)
64map: new TypeMap(constructedFrom.ContainingType, constructedFrom.OriginalDefinition.TypeParameters, typeArgumentsWithAnnotations),
Symbols\ErrorTypeSymbol.cs (1)
639_map = new TypeMap(constructedFrom.ContainingType, constructedFrom.OriginalDefinition.TypeParameters, typeArgumentsWithAnnotations);
Symbols\ExtendedErrorTypeSymbol.cs (3)
299((object)this.ContainingType != null ? this.ContainingType.Equals(other.ContainingType, comparison) :
Symbols\Metadata\PE\DynamicTypeDecoder.cs (2)
224NamedTypeSymbol containingType = namedType.ContainingType; 228newContainingType = TransformNamedType(namedType.ContainingType, isContaining: true);
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (1)
93var containingType = namedType.ContainingType;
Symbols\Metadata\PE\MetadataDecoder.cs (1)
261namedType = namedType.ContainingType;
Symbols\Metadata\PE\SymbolFactory.cs (1)
123typeToCheck = typeToCheck.ContainingType;
Symbols\Metadata\PE\TupleTypeDecoder.cs (1)
259NamedTypeSymbol containingType = type.ContainingType;
Symbols\MissingMetadataTypeSymbol.cs (1)
123else if (ContainingType is ErrorTypeSymbol { ErrorInfo: { } info })
Symbols\NamedTypeSymbol.cs (13)
855if ((object)this.ContainingType != null && 856!this.ContainingType.Equals(other.ContainingType, comparison)) 925ContainingType?.AddNullableTransforms(transforms); 1074definition = definition.ContainingType; 1079typeA = typeA.ContainingType; 1080typeB = typeB.ContainingType; 1242for (var current = this; !ReferenceEquals(current, null); current = current.ContainingType) 1273var outer = ContainingType; 1294var outer = ContainingType; 1305ContainingType?.GetAllTypeArgumentsNoUseSiteDiagnostics(builder); 1313var outer = ContainingType; 1399currentType = currentType.ContainingType;
Symbols\Retargeting\RetargetingSymbolTranslator.cs (10)
285var container = type.ContainingType; 295container = container.ContainingType; 449NamedTypeSymbol containingType = type.ContainingType; 510Debug.Assert((object)type.ContainingType == null || !type.ContainingType.IsUnboundGenericType()); 528genericType = genericType.ContainingType; 575genericType = genericType.ContainingType; 679namedType = namedType.ContainingType; 1088containingType = containingType.ContainingType; 1089retargetedContainingType = retargetedContainingType.ContainingType;
Symbols\Source\SourceAssemblySymbol.cs (1)
2791Debug.Assert((object)originalDefinition.ContainingType == null, "How did a nested type get forwarded?");
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1116for (NamedTypeSymbol curr = this.ContainingType; (object)curr != null; curr = curr.ContainingType)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
239else if ((object)ContainingType.ContainingType != null)
Symbols\SymbolExtensions.cs (2)
316while ((object?)upperLevelType.ContainingType != null) 318upperLevelType = upperLevelType.ContainingType;
Symbols\Tuples\TupleTypeSymbol.cs (1)
261Binder.ReportDiagnosticsIfObsoleteInternal(diagnostics, firstTupleType, syntax, firstTupleType.ContainingType, BinderFlags.None);
Symbols\TypeSymbolExtensions.cs (9)
964for (var parent2 = s2.ContainingType; (object)parent2 != null; parent2 = parent2.ContainingType) 1006for (var parent2 = s2.ContainingType; (object)parent2 != null; parent2 = parent2.ContainingType) 1074for (var parent2 = s2.ContainingType; (object)parent2 != null; parent2 = parent2.ContainingType) 1100return (object)type.ContainingType == null; 1489code = Hash.Combine(type.ContainingType, code); 1535type = type.ContainingType; 1596if ((object)type.ContainingType == null) 1612var containingType = type.ContainingType; 2068return type is NamedTypeSymbol { Name: "INumberBase", IsInterface: true, Arity: 1, ContainingType: null } &&
Symbols\TypeUnification.cs (4)
180return (object)nt1.ContainingType == null || CanUnifyHelper(nt1.ContainingType, nt2.ContainingType, ref substitution); 287namedType = namedType.ContainingType;
Symbols\UnboundGenericType.cs (1)
29NamedTypeSymbol originalContainingType = original.ContainingType;
Symbols\VarianceSafety.cs (2)
98for (var container = member.ContainingType; container is object; container = container.ContainingType) 418namedType = namedType.ContainingType;
Utilities\TypeSymbolExtensions.cs (2)
64namedType = namedType.ContainingType; 148namedType = namedType.ContainingType;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTupleTest.cs (1)
27009var container = contained.ContainingType;
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (4)
CompilationContext.cs (3)
940for (var type = substitutedSourceType; type is object; type = type.ContainingType) 1764type = type.ContainingType!; 1819var containing = candidateSubstitutedSourceType.ContainingType;
CompilationExtensions.cs (1)
39foreach (var member in containingType.ContainingType.GetMembers(sourceMethodName))
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (5)
ExpressionCompilerTestBase.cs (1)
436var container = type.ContainingType;
ExpressionCompilerTests.cs (2)
2089Assert.Equal(returnType.TypeArguments()[0].ContainingSymbol, containingType.ContainingType); 2097Assert.Equal(typeArg.ContainingSymbol, containingType.ContainingType);
LocalsTests.cs (2)
1770returnType = returnType.ContainingType; 1787returnType = returnType.ContainingType;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\NullableReferenceTypesTests.cs (2)
112063var cDefinition = iDefinition.ContainingType; 112113var cDefinition = iDefinition.ContainingType;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (17)
DocumentationComments\CrefTests.cs (1)
1709Assert.Equal(actualParameterType, actualWinner.ContainingType.ContainingType.TypeArguments().Single());
Symbols\CompilationCreationTests.cs (3)
2287var args1 = retval1.ContainingType.TypeArguments().Concat(retval1.TypeArguments()); 2288var params1 = retval1.ContainingType.TypeParameters.Concat(retval1.TypeParameters); 2297var retval2 = retval1.ContainingType;
Symbols\Metadata\PE\BaseTypeResolution.cs (2)
301Assert.Equal(base7.ContainingType, assembly1.CachedTypeByEmittedName(base7.ContainingType.ToTestDisplayString()));
Symbols\Source\TypeMapTests.cs (11)
61Assert.Equal(atbu, c.ContainingType); 62Assert.Equal(u, TypeArg(c.ContainingType)); 63Assert.Equal(at, c.ContainingType.ContainingType); 64Assert.Equal(t, TypeArg(c.ContainingType.ContainingType)); 73Assert.Equal(top, bf.ContainingType); 76Assert.Equal(ae, aebf.ContainingType); 80Assert.Equal(f, TypeArg(aebfc.ContainingType)); 81Assert.Equal(e, TypeArg(aebfc.ContainingType.ContainingType));