45 references to ContainingType
Microsoft.CodeAnalysis.CSharp (45)
Binder\Binder.cs (1)
611
ReportDiagnosticsIfObsolete(diagnostics, symbol, node, hasBaseReceiver, this.ContainingMemberOrLambda, this.
ContainingType
, this.Flags);
Binder\Binder.ValueChecks.cs (2)
2020
Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.
ContainingType
);
2069
Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.
ContainingType
);
Binder\Binder_Attributes.cs (1)
638
var propertySymbol = ((PropertySymbol)namedArgumentNameSymbol).GetLeastOverriddenProperty(this.
ContainingType
);
Binder\Binder_Conversions.cs (2)
2716
if (InFieldInitializer && !
ContainingType
!.IsScriptClass || InConstructorInitializer || InAttributeArgument)
2739
var containingType = this.
ContainingType
;
Binder\Binder_Crefs.cs (3)
374
NamedTypeSymbol? containingType =
ContainingType
;
620
if (containerType.Name == memberName && (hasParameterList || containerType.Arity == 0 || !TypeSymbol.Equals(this.
ContainingType
, containerType.OriginalDefinition, TypeCompareKind.ConsiderEverything2)))
631
NamedTypeSymbol? binderContainingType = this.
ContainingType
;
Binder\Binder_Deconstruct.cs (1)
945
BoundThisReference receiver = ThisReference(designation, this.
ContainingType
, hasErrors: false,
Binder\Binder_Expressions.cs (13)
1453
Debug.Assert(
ContainingType
is { });
1798
ContainingType
is SourceMemberContainerTypeSymbol { IsRecord: false, IsRecordStruct: false, PrimaryConstructor: SynthesizedPrimaryConstructor { ParameterCount: not 0 } primaryConstructor, OriginalDefinition: var containingTypeDefinition } &&
1978
var currentType = this.
ContainingType
;
2078
ContainingType
,
2317
var currentType = this.
ContainingType
;
2382
if (this.
ContainingType
.TypeKind == TypeKind.Submission
2528
return ThisReference(node, this.
ContainingType
, hasErrors);
2568
TypeSymbol baseType = this.
ContainingType
is null ? null : this.
ContainingType
.BaseTypeNoUseSiteDiagnostics;
2582
else if (this.
ContainingType
is null || node.Parent is null || (node.Parent.Kind() != SyntaxKind.SimpleMemberAccessExpression && node.Parent.Kind() != SyntaxKind.ElementAccessExpression))
3323
foreach (Symbol member in
ContainingType
?.GetMembers(identifier) ?? ImmutableArray<Symbol>.Empty)
6663
NamedTypeSymbol containingType = this.
ContainingType
;
9028
var containingType = this.
ContainingType
;
Binder\Binder_Invocation.cs (6)
434
Debug.Assert(
ContainingType
is not null);
443
receiverOpt: new BoundTypeExpression(node, null, this.
ContainingType
).MakeCompilerGenerated(),
1096
else if (call.ReceiverOpt.Kind == BoundKind.BaseReference && this.
ContainingType
.IsRestrictedType())
1098
SymbolDistinguisher distinguisher = new SymbolDistinguisher(compilation, this.
ContainingType
, call.Method.ContainingType);
2079
: this.
ContainingType
;
2320
var methodContainer = expr.Type ?? this.
ContainingType
;
Binder\Binder_Lookup.cs (3)
1536
diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_BadProtectedAccess, unwrappedSymbol, accessThroughType, this.
ContainingType
);
1629
var property = ((PropertySymbol)symbol).GetLeastOverriddenProperty(this.
ContainingType
);
1636
var @event = ((EventSymbol)symbol).GetLeastOverriddenEvent(this.
ContainingType
);
Binder\Binder_Operators.cs (2)
3673
existing.Add(method.GetLeastOverriddenMethod(
ContainingType
));
3678
if (IsViableInstanceOperator(method, parameterCount) && !existing.Contains(method.GetLeastOverriddenMethod(
ContainingType
)))
Binder\Binder_Statements.cs (4)
1785
var leastOverridden = (EventSymbol)eventSymbol.GetLeastOverriddenMember(this.
ContainingType
);
1843
return this.
ContainingType
;
3775
&&
ContainingType
.IsDefaultValueTypeConstructor(initializer);
3795
ContainingType
is SourceMemberContainerTypeSymbol { HasPrimaryConstructor: true };
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1329
for (NamedTypeSymbol curr = outerBinder.
ContainingType
; (object)curr != null; curr = curr.ContainingType)
Binder\ExpressionVariableFinder.cs (3)
606
NamedTypeSymbol? container = _scopeBinder.
ContainingType
;
627
NamedTypeSymbol? container = _scopeBinder.
ContainingType
;
654
NamedTypeSymbol container = _scopeBinder.
ContainingType
;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1150
var leastOverriddenMember = (TMember)member.GetLeastOverriddenMember(_binder.
ContainingType
);
Compilation\CSharpSemanticModel.cs (2)
1594
TypeSymbol containingType = binder.
ContainingType
;
3684
NamedTypeSymbol containingType = binder.
ContainingType
;