Base:
property
ContainingType
Microsoft.CodeAnalysis.CSharp.Symbol.ContainingType
3 overrides of ContainingType
Microsoft.CodeAnalysis.CSharp (3)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
615
public override NamedTypeSymbol
ContainingType
Symbols\Source\SourceMemberContainerSymbol.cs (1)
755
public sealed override NamedTypeSymbol?
ContainingType
Symbols\SubstitutedNamedTypeSymbol.cs (1)
127
public override NamedTypeSymbol
ContainingType
102 references to ContainingType
Microsoft.CodeAnalysis.CSharp (102)
Binder\Binder_Crefs.cs (2)
607
NamedTypeSymbol containing = type.
ContainingType
;
614
containing = containing.
ContainingType
;
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1311
for (NamedTypeSymbol curr = outerBinder.ContainingType; (object)curr != null; curr = curr.
ContainingType
)
Binder\RefSafetyAnalysis.cs (1)
51
type = def.
ContainingType
;
Binder\Semantics\AccessCheck.cs (3)
246
var containingType = type.
ContainingType
;
485
current = current.
ContainingType
;
533
current = current.
ContainingType
;
Compiler\ClsComplianceChecker.cs (3)
1070
NamedTypeSymbol containingType = type.
ContainingType
;
1083
containingType = containingType.
ContainingType
;
1106
context = context.
ContainingType
;
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
164
for (NamedTypeSymbol curr = containingSymbol.ContainingType; (object)curr != null; curr = curr.
ContainingType
)
Emitter\Model\GenericNestedTypeInstanceReference.cs (1)
25
return ((PEModuleBuilder)context.Module).Translate(UnderlyingNamedType.
ContainingType
, syntaxNodeOpt: (CSharpSyntaxNode)context.SyntaxNode, diagnostics: context.Diagnostics);
Emitter\Model\NamedTypeSymbolAdapter.cs (12)
121
(object)AdaptedNamedTypeSymbol.
ContainingType
== null)
136
if ((object)AdaptedNamedTypeSymbol.
ContainingType
== null &&
150
if ((object)AdaptedNamedTypeSymbol.
ContainingType
!= null)
170
if ((object)AdaptedNamedTypeSymbol.
ContainingType
!= null &&
187
(AdaptedNamedTypeSymbol.Arity == 0 || PEModuleBuilder.IsGenericType(AdaptedNamedTypeSymbol.
ContainingType
)))
189
Debug.Assert((object)AdaptedNamedTypeSymbol.
ContainingType
!= null &&
190
PEModuleBuilder.IsGenericType(AdaptedNamedTypeSymbol.
ContainingType
));
823
Debug.Assert((object)AdaptedNamedTypeSymbol.
ContainingType
== null && AdaptedNamedTypeSymbol.ContainingModule is SourceModuleSymbol);
837
return moduleBeingBuilt.Translate(AdaptedNamedTypeSymbol.
ContainingType
,
847
Debug.Assert((object)AdaptedNamedTypeSymbol.
ContainingType
!= null);
850
return AdaptedNamedTypeSymbol.
ContainingType
.GetCciAdapter();
858
Debug.Assert((object)AdaptedNamedTypeSymbol.
ContainingType
!= null);
Emitter\Model\PEModuleBuilder.cs (4)
757
Debug.Assert((object)originalDefinition.
ContainingType
== null, "How did a nested type get forwarded?");
1016
NamedTypeSymbol container = namedTypeSymbol.
ContainingType
;
1121
toCheck = toCheck.
ContainingType
;
1480
AddSynthesizedDefinition(result.
ContainingType
, result.GetCciAdapter());
Emitter\Model\SpecializedNestedTypeReference.cs (1)
43
return ((PEModuleBuilder)context.Module).Translate(UnderlyingNamedType.
ContainingType
, (CSharpSyntaxNode)context.SyntaxNode, context.Diagnostics);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
299
if ((object)namedType.
ContainingType
!= null)
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
350
if (builderType.IsUnboundGenericType && builderType.
ContainingType
?.IsGenericType != true && builderType.Arity == 1)
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
153
containingType = containingType.
ContainingType
;
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (2)
195
if (type.
ContainingType
is null)
200
type = type.
ContainingType
;
Symbols\AbstractTypeMap.cs (1)
29
NamedTypeSymbol newContainingType = SubstituteNamedType(previous.
ContainingType
);
Symbols\AssemblySymbol.cs (2)
1034
Debug.Assert((object)result.
ContainingType
== null || IsValidWellKnownType(result.
ContainingType
),
Symbols\BaseTypeAnalysis.cs (1)
58
TypeDependsClosure(type.
ContainingType
, currentCompilation, partialClosure);
Symbols\Compilation_WellKnownMembers.cs (2)
1106
if ((object)named.
ContainingType
!= null)
1120
if ((object)named.
ContainingType
!= null)
Symbols\ConstructedNamedTypeSymbol.cs (1)
64
map: new TypeMap(constructedFrom.
ContainingType
, constructedFrom.OriginalDefinition.TypeParameters, typeArgumentsWithAnnotations),
Symbols\ErrorTypeSymbol.cs (1)
667
_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)
224
NamedTypeSymbol containingType = namedType.
ContainingType
;
228
newContainingType = TransformNamedType(namedType.
ContainingType
, isContaining: true);
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (1)
93
var containingType = namedType.
ContainingType
;
Symbols\Metadata\PE\MetadataDecoder.cs (1)
261
namedType = namedType.
ContainingType
;
Symbols\Metadata\PE\SymbolFactory.cs (1)
123
typeToCheck = typeToCheck.
ContainingType
;
Symbols\Metadata\PE\TupleTypeDecoder.cs (1)
259
NamedTypeSymbol containingType = type.
ContainingType
;
Symbols\MissingMetadataTypeSymbol.cs (1)
124
else if (
ContainingType
is ErrorTypeSymbol { ErrorInfo: { } info })
Symbols\NamedTypeSymbol.cs (13)
842
if ((object)this.
ContainingType
!= null &&
843
!this.
ContainingType
.Equals(other.
ContainingType
, comparison))
912
ContainingType
?.AddNullableTransforms(transforms);
1061
definition = definition.
ContainingType
;
1066
typeA = typeA.
ContainingType
;
1067
typeB = typeB.
ContainingType
;
1231
for (var current = this; !ReferenceEquals(current, null); current = current.
ContainingType
)
1262
var outer =
ContainingType
;
1283
var outer =
ContainingType
;
1294
ContainingType
?.GetAllTypeArgumentsNoUseSiteDiagnostics(builder);
1302
var outer =
ContainingType
;
1388
currentType = currentType.
ContainingType
;
Symbols\Retargeting\RetargetingSymbolTranslator.cs (10)
285
var container = type.
ContainingType
;
295
container = container.
ContainingType
;
449
NamedTypeSymbol containingType = type.
ContainingType
;
510
Debug.Assert((object)type.
ContainingType
== null || !type.
ContainingType
.IsUnboundGenericType());
528
genericType = genericType.
ContainingType
;
575
genericType = genericType.
ContainingType
;
679
namedType = namedType.
ContainingType
;
1065
containingType = containingType.
ContainingType
;
1066
retargetedContainingType = retargetedContainingType.
ContainingType
;
Symbols\Source\SourceAssemblySymbol.cs (1)
2838
Debug.Assert((object)originalDefinition.
ContainingType
== null, "How did a nested type get forwarded?");
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1561
for (NamedTypeSymbol curr = this.ContainingType; (object)curr != null; curr = curr.
ContainingType
)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
226
else if ((object)ContainingType.
ContainingType
!= null)
Symbols\SymbolExtensions.cs (2)
322
while ((object?)upperLevelType.
ContainingType
!= null)
324
upperLevelType = upperLevelType.
ContainingType
;
Symbols\Tuples\TupleTypeSymbol.cs (1)
255
Binder.ReportDiagnosticsIfObsoleteInternal(diagnostics, firstTupleType, syntax, firstTupleType.
ContainingType
, BinderFlags.None);
Symbols\TypeSymbolExtensions.cs (12)
1052
for (var parent2 = s2.ContainingType; (object)parent2 != null; parent2 = parent2.
ContainingType
)
1094
for (var parent2 = s2.ContainingType; (object)parent2 != null; parent2 = parent2.
ContainingType
)
1162
for (var parent2 = s2.ContainingType; (object)parent2 != null; parent2 = parent2.
ContainingType
)
1188
return (object)type.
ContainingType
== null;
1373
ContainingType
: null,
1386
ContainingType
: null,
1580
code = Hash.Combine(type.
ContainingType
, code);
1626
type = type.
ContainingType
;
1687
if ((object)type.
ContainingType
== null)
1703
var containingType = type.
ContainingType
;
2136
return typeSymbol is NamedTypeSymbol { Name: WellKnownMemberNames.LockTypeName, Arity: 0,
ContainingType
: null } &&
2169
return type is NamedTypeSymbol { Name: "INumberBase", IsInterface: true, Arity: 1,
ContainingType
: null } &&
Symbols\TypeUnification.cs (4)
180
return (object)nt1.
ContainingType
== null || CanUnifyHelper(nt1.
ContainingType
, nt2.
ContainingType
, ref substitution);
287
namedType = namedType.
ContainingType
;
Symbols\UnboundGenericType.cs (1)
29
NamedTypeSymbol originalContainingType = original.
ContainingType
;
Symbols\VarianceSafety.cs (2)
98
for (var container = member.ContainingType; container is object; container = container.
ContainingType
)
418
namedType = namedType.
ContainingType
;
Utilities\TypeSymbolExtensions.cs (2)
64
namedType = namedType.
ContainingType
;
148
namedType = namedType.
ContainingType
;