40 references to ContainingType
Microsoft.CodeAnalysis.CSharp (40)
Binder\Binder.cs (1)
611ReportDiagnosticsIfObsolete(diagnostics, symbol, node, hasBaseReceiver, this.ContainingMemberOrLambda, this.ContainingType, this.Flags);
Binder\Binder.ValueChecks.cs (2)
1786Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType); 1835Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType);
Binder\Binder_Attributes.cs (1)
636var propertySymbol = ((PropertySymbol)namedArgumentNameSymbol).GetLeastOverriddenProperty(this.ContainingType);
Binder\Binder_Crefs.cs (2)
421if (containerType.Name == memberName && (hasParameterList || containerType.Arity == 0 || !TypeSymbol.Equals(this.ContainingType, containerType.OriginalDefinition, TypeCompareKind.ConsiderEverything2))) 432NamedTypeSymbol? binderContainingType = this.ContainingType;
Binder\Binder_Deconstruct.cs (1)
942BoundThisReference receiver = ThisReference(designation, this.ContainingType, hasErrors: false,
Binder\Binder_Expressions.cs (13)
1440Debug.Assert(ContainingType is { }); 1728ContainingType is SourceMemberContainerTypeSymbol { IsRecord: false, IsRecordStruct: false, PrimaryConstructor: SynthesizedPrimaryConstructor { ParameterCount: not 0 } primaryConstructor, OriginalDefinition: var containingTypeDefinition } && 1908var currentType = this.ContainingType; 2008ContainingType, 2255var currentType = this.ContainingType; 2320if (this.ContainingType.TypeKind == TypeKind.Submission 2466return ThisReference(node, this.ContainingType, hasErrors); 2506TypeSymbol baseType = this.ContainingType is null ? null : this.ContainingType.BaseTypeNoUseSiteDiagnostics; 2520else if (this.ContainingType is null || node.Parent is null || (node.Parent.Kind() != SyntaxKind.SimpleMemberAccessExpression && node.Parent.Kind() != SyntaxKind.ElementAccessExpression)) 3259foreach (Symbol member in ContainingType?.GetMembers(identifier) ?? ImmutableArray<Symbol>.Empty) 6580NamedTypeSymbol containingType = this.ContainingType; 8665var containingType = this.ContainingType;
Binder\Binder_Invocation.cs (6)
425Debug.Assert(ContainingType is not null); 434receiverOpt: new BoundTypeExpression(node, null, this.ContainingType).MakeCompilerGenerated(), 1056else if (call.ReceiverOpt.Kind == BoundKind.BaseReference && this.ContainingType.IsRestrictedType()) 1058SymbolDistinguisher distinguisher = new SymbolDistinguisher(compilation, this.ContainingType, call.Method.ContainingType); 1945: this.ContainingType; 2173var methodContainer = expr.Type ?? this.ContainingType;
Binder\Binder_Lookup.cs (3)
1458diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_BadProtectedAccess, unwrappedSymbol, accessThroughType, this.ContainingType); 1551var property = ((PropertySymbol)symbol).GetLeastOverriddenProperty(this.ContainingType); 1558var @event = ((EventSymbol)symbol).GetLeastOverriddenEvent(this.ContainingType);
Binder\Binder_Statements.cs (4)
1747var leastOverridden = (EventSymbol)eventSymbol.GetLeastOverriddenMember(this.ContainingType); 1805return this.ContainingType; 3733&& ContainingType.IsDefaultValueTypeConstructor(initializer); 3753ContainingType is SourceMemberContainerTypeSymbol { HasPrimaryConstructor: true };
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1311for (NamedTypeSymbol curr = outerBinder.ContainingType; (object)curr != null; curr = curr.ContainingType)
Binder\ExpressionVariableFinder.cs (3)
599NamedTypeSymbol container = _scopeBinder.ContainingType; 620NamedTypeSymbol container = _scopeBinder.ContainingType; 645NamedTypeSymbol container = _scopeBinder.ContainingType;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1139var leastOverriddenMember = (TMember)member.GetLeastOverriddenMember(_binder.ContainingType);
Compilation\CSharpSemanticModel.cs (2)
1591TypeSymbol containingType = binder.ContainingType; 3682NamedTypeSymbol containingType = binder.ContainingType;