39 references to ContainingType
Microsoft.CodeAnalysis.CSharp (39)
Binder\Binder.cs (1)
606
ReportDiagnosticsIfObsolete(diagnostics, symbol, node, hasBaseReceiver, this.ContainingMemberOrLambda, this.
ContainingType
, this.Flags);
Binder\Binder.ValueChecks.cs (2)
1553
Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.
ContainingType
);
1602
Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.
ContainingType
);
Binder\Binder_Attributes.cs (1)
618
var propertySymbol = ((PropertySymbol)namedArgumentNameSymbol).GetLeastOverriddenProperty(this.
ContainingType
);
Binder\Binder_Conversions.cs (2)
1183
if (InFieldInitializer && !
ContainingType
!.IsScriptClass || InConstructorInitializer || InAttributeArgument)
1205
var containingType = this.
ContainingType
;
Binder\Binder_Crefs.cs (2)
421
if (containerType.Name == memberName && (hasParameterList || containerType.Arity == 0 || !TypeSymbol.Equals(this.
ContainingType
, containerType.OriginalDefinition, TypeCompareKind.ConsiderEverything2)))
432
NamedTypeSymbol? binderContainingType = this.
ContainingType
;
Binder\Binder_Deconstruct.cs (1)
942
BoundThisReference receiver = ThisReference(designation, this.
ContainingType
, hasErrors: false,
Binder\Binder_Expressions.cs (11)
1755
var currentType = this.
ContainingType
;
1855
ContainingType
,
2071
var currentType = this.
ContainingType
;
2125
if (this.
ContainingType
.TypeKind == TypeKind.Submission
2271
return ThisReference(node, this.
ContainingType
, hasErrors);
2296
TypeSymbol baseType = this.
ContainingType
is null ? null : this.
ContainingType
.BaseTypeNoUseSiteDiagnostics;
2310
else if (this.
ContainingType
is null || node.Parent is null || (node.Parent.Kind() != SyntaxKind.SimpleMemberAccessExpression && node.Parent.Kind() != SyntaxKind.ElementAccessExpression))
3043
foreach (Symbol member in
ContainingType
?.GetMembers(identifier) ?? ImmutableArray<Symbol>.Empty)
5601
NamedTypeSymbol containingType = this.
ContainingType
;
7583
var containingType = this.
ContainingType
;
Binder\Binder_Invocation.cs (5)
346
receiverOpt: new BoundTypeExpression(node, null, this.
ContainingType
).MakeCompilerGenerated(),
892
else if (call.ReceiverOpt.Kind == BoundKind.BaseReference && this.
ContainingType
.IsRestrictedType())
894
SymbolDistinguisher distinguisher = new SymbolDistinguisher(compilation, this.
ContainingType
, call.Method.ContainingType);
1623
: this.
ContainingType
;
1837
var methodContainer = expr.Type ?? this.
ContainingType
;
Binder\Binder_Lookup.cs (3)
1458
diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_BadProtectedAccess, unwrappedSymbol, accessThroughType, this.
ContainingType
);
1551
var property = ((PropertySymbol)symbol).GetLeastOverriddenProperty(this.
ContainingType
);
1558
var @event = ((EventSymbol)symbol).GetLeastOverriddenEvent(this.
ContainingType
);
Binder\Binder_Statements.cs (4)
1756
var leastOverridden = (EventSymbol)eventSymbol.GetLeastOverriddenMember(this.
ContainingType
);
1796
return this.
ContainingType
;
3635
&&
ContainingType
.IsDefaultValueTypeConstructor(initializer);
3655
ContainingType
is SourceMemberContainerTypeSymbol { PrimaryConstructor: not null };
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1286
for (NamedTypeSymbol curr = outerBinder.
ContainingType
; (object)curr != null; curr = curr.ContainingType)
Binder\ExpressionVariableFinder.cs (3)
542
NamedTypeSymbol container = _scopeBinder.
ContainingType
;
563
NamedTypeSymbol container = _scopeBinder.
ContainingType
;
588
NamedTypeSymbol container = _scopeBinder.
ContainingType
;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
905
var leastOverriddenMember = (TMember)member.GetLeastOverriddenMember(_binder.
ContainingType
);
Compilation\CSharpSemanticModel.cs (2)
1591
TypeSymbol containingType = binder.
ContainingType
;
3671
NamedTypeSymbol containingType = binder.
ContainingType
;