Base:
property
ContainingType
Microsoft.CodeAnalysis.CSharp.Symbol.ContainingType
3 overrides of ContainingType
Microsoft.CodeAnalysis.CSharp (3)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
810public override NamedTypeSymbol ContainingType
Symbols\Source\SourceMemberContainerSymbol.cs (1)
763public sealed override NamedTypeSymbol? ContainingType
Symbols\SubstitutedNamedTypeSymbol.cs (1)
131public override NamedTypeSymbol ContainingType
112 references to ContainingType
Microsoft.CodeAnalysis.CSharp (112)
Binder\Binder_Crefs.cs (2)
626NamedTypeSymbol containing = type.ContainingType; 633containing = containing.ContainingType;
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1329for (NamedTypeSymbol curr = outerBinder.ContainingType; (object)curr != null; curr = curr.ContainingType)
Binder\RefSafetyAnalysis.cs (1)
51type = def.ContainingType;
Binder\Semantics\AccessCheck.cs (4)
246var containingType = type.ContainingType; 332containingType.IsExtension && containingType.ContainingType is { } extensionEnclosingType ? extensionEnclosingType : containingType, 486current = current.ContainingType; 534current = current.ContainingType;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (1)
3205extension.ContainingType,
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1894? memberWithPriority.ContainingType.ContainingType
Compiler\ClsComplianceChecker.cs (3)
1070NamedTypeSymbol containingType = type.ContainingType; 1083containingType = containingType.ContainingType; 1106context = 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)
122(object)AdaptedNamedTypeSymbol.ContainingType == null) 137if ((object)AdaptedNamedTypeSymbol.ContainingType == null && 151if ((object)AdaptedNamedTypeSymbol.ContainingType != null) 171if ((object)AdaptedNamedTypeSymbol.ContainingType != null && 188(AdaptedNamedTypeSymbol.Arity == 0 || PEModuleBuilder.IsGenericType(AdaptedNamedTypeSymbol.ContainingType))) 190Debug.Assert((object)AdaptedNamedTypeSymbol.ContainingType != null && 191PEModuleBuilder.IsGenericType(AdaptedNamedTypeSymbol.ContainingType)); 829Debug.Assert((object)AdaptedNamedTypeSymbol.ContainingType == null && AdaptedNamedTypeSymbol.ContainingModule is SourceModuleSymbol); 843return moduleBeingBuilt.Translate(AdaptedNamedTypeSymbol.ContainingType, 853Debug.Assert((object)AdaptedNamedTypeSymbol.ContainingType != null); 856return AdaptedNamedTypeSymbol.ContainingType.GetCciAdapter(); 864Debug.Assert((object)AdaptedNamedTypeSymbol.ContainingType != null);
Emitter\Model\PEModuleBuilder.cs (4)
757Debug.Assert((object)originalDefinition.ContainingType == null, "How did a nested type get forwarded?"); 1016NamedTypeSymbol container = namedTypeSymbol.ContainingType; 1121toCheck = toCheck.ContainingType; 1480AddSynthesizedDefinition(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)
298if ((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;
Lowering\SyntheticBoundNodeFactory.cs (1)
151ModuleBuilderOpt.AddSynthesizedDefinition(nestedType.ContainingType, nestedType.GetCciAdapter());
Symbols\AbstractTypeMap.cs (1)
29NamedTypeSymbol newContainingType = SubstituteNamedType(previous.ContainingType);
Symbols\AssemblySymbol.cs (2)
1034Debug.Assert((object)result.ContainingType == null || IsValidWellKnownType(result.ContainingType),
Symbols\BaseTypeAnalysis.cs (1)
58TypeDependsClosure(type.ContainingType, currentCompilation, partialClosure);
Symbols\Compilation_WellKnownMembers.cs (2)
1106if ((object)named.ContainingType != null) 1120if ((object)named.ContainingType != null)
Symbols\ConstructedNamedTypeSymbol.cs (1)
64map: new TypeMap(constructedFrom.ContainingType, constructedFrom.OriginalDefinition.TypeParameters, typeArgumentsWithAnnotations),
Symbols\ErrorTypeSymbol.cs (1)
675_map = new TypeMap(constructedFrom.ContainingType, constructedFrom.OriginalDefinition.TypeParameters, typeArgumentsWithAnnotations);
Symbols\ExtendedErrorTypeSymbol.cs (3)
300((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)
124else if (ContainingType is ErrorTypeSymbol { ErrorInfo: { } info })
Symbols\NamedTypeSymbol.cs (13)
856if ((object)this.ContainingType != null && 857!this.ContainingType.Equals(other.ContainingType, comparison)) 926ContainingType?.AddNullableTransforms(transforms); 1075definition = definition.ContainingType; 1080typeA = typeA.ContainingType; 1081typeB = typeB.ContainingType; 1247for (var current = this; !ReferenceEquals(current, null); current = current.ContainingType) 1278var outer = ContainingType; 1299var outer = ContainingType; 1310ContainingType?.GetAllTypeArgumentsNoUseSiteDiagnostics(builder); 1318var outer = ContainingType; 1404currentType = 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; 1065containingType = containingType.ContainingType; 1066retargetedContainingType = retargetedContainingType.ContainingType;
Symbols\Source\SourceAssemblySymbol.cs (1)
2839Debug.Assert((object)originalDefinition.ContainingType == null, "How did a nested type get forwarded?");
Symbols\Source\SourceMemberMethodSymbol.cs (1)
397if (containingType is { IsExtension: true, ContainingType: { } enclosing })
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1562for (NamedTypeSymbol curr = this.ContainingType; (object)curr != null; curr = curr.ContainingType)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1984if (ContainingType is null || !ContainingType.IsStatic || ContainingType.Arity != 0 || ContainingType.ContainingType is not null)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
227else if ((object)ContainingType.ContainingType != null)
Symbols\Source\SourcePropertySymbol.cs (2)
593if (containingType is { IsExtension: true, ContainingType: { } enclosing }) 676if (containingTypeForFileTypeCheck is { IsExtension: true, ContainingType: { } enclosing })
Symbols\SymbolExtensions.cs (2)
309while ((object?)upperLevelType.ContainingType != null) 311upperLevelType = upperLevelType.ContainingType;
Symbols\Tuples\TupleTypeSymbol.cs (1)
254Binder.ReportDiagnosticsIfObsoleteInternal(diagnostics, firstTupleType, syntax, firstTupleType.ContainingType, BinderFlags.None);
Symbols\TypeSymbolExtensions.cs (14)
1053for (var parent2 = s2.ContainingType; (object)parent2 != null; parent2 = parent2.ContainingType) 1095for (var parent2 = s2.ContainingType; (object)parent2 != null; parent2 = parent2.ContainingType) 1163for (var parent2 = s2.ContainingType; (object)parent2 != null; parent2 = parent2.ContainingType) 1189return (object)type.ContainingType == null; 1374ContainingType: null, 1387ContainingType: null, 1581code = Hash.Combine(type.ContainingType, code); 1627type = type.ContainingType; 1688if ((object)type.ContainingType == null) 1704var containingType = type.ContainingType; 1729type = type.ContainingType; 2136return typeSymbol is NamedTypeSymbol { Name: WellKnownMemberNames.LockTypeName, Arity: 0, ContainingType: null } && 2146ContainingType: null, 2180return 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)
101for (var container = member.ContainingType; container is object; container = container.ContainingType) 421namedType = namedType.ContainingType;
Utilities\TypeSymbolExtensions.cs (2)
64namedType = namedType.ContainingType; 148namedType = namedType.ContainingType;