BoundTree\Constructors.cs (3)
62!fieldSymbol.ContainingType.IsValueType ||
254: this(syntax, constructor, ImmutableArray.Create<BoundExpression>(arguments), default(ImmutableArray<string?>), default(ImmutableArray<RefKind>), false, default(ImmutableArray<int>), default(BitVector), null, null, constructor.ContainingType)
258: this(syntax, constructor, arguments, default(ImmutableArray<string?>), default(ImmutableArray<RefKind>), false, default(ImmutableArray<int>), default(BitVector), null, null, constructor.ContainingType)
Compiler\MethodCompiler.cs (13)
236synthesizedEntryPoint = new SynthesizedEntryPointSymbol.AsyncForwardEntryPoint(compilation, entryPoint.ContainingType, entryPoint);
240moduleBeingBuilt.AddSynthesizedDefinition(entryPoint.ContainingType, synthesizedEntryPoint.GetCciAdapter());
269new TypeCompilationState(synthesizedEntryPoint.ContainingType, compilation, moduleBeingBuilt),
824if (!interfaces.Contains(synthesizedExplicitImpl.ExplicitInterfaceImplementations[0].ContainingType,
888if (methodSymbol.IsAbstract || methodSymbol.ContainingType?.IsDelegateType() == true)
1014Debug.Assert(!prependedDefaultValueTypeConstructorInitializer || methodSymbol.ContainingType.IsStructType());
1028((methodSymbol.ContainingType.IsStructType() && !methodSymbol.IsImplicitConstructor) ||
1387method.ContainingType,
1414method.ContainingType,
1432method.ContainingType,
2240Debug.Assert(!method.ContainingType.IsDelegateType());
2265if (ctorCall != null && !ctorCall.HasAnyErrors && ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
FlowAnalysis\NullableWalker.cs (30)
649? method.ContainingType.GetMembersUnordered().SelectManyAsArray(
659foreach (var member in method.ContainingType.GetMembersUnordered())
674if (chainedConstructorEnforcesRequiredMembers && !constructorEnforcesRequiredMembers && method.ContainingType.BaseTypeNoUseSiteDiagnostics is { } baseType)
792foreach (var member in method.ContainingType.GetMembers(memberName))
821enforceMemberNotNullWhenIfAffected(returnStatement.Syntax, sense: true, method.ContainingType.GetMembers(memberName), pendingReturn.StateWhenTrue, pendingReturn.StateWhenFalse);
826enforceMemberNotNullWhenIfAffected(returnStatement.Syntax, sense: false, method.ContainingType.GetMembers(memberName), pendingReturn.StateWhenFalse, pendingReturn.StateWhenTrue);
855foreach (var member in method.ContainingType.GetMembers(memberName))
997&& (!method.ContainingType.IsValueType
1001return membersToBeInitialized(method.ContainingType, includeAllMembers: true, includeCurrentTypeRequiredMembers, includeBaseRequiredMembers);
1006return membersToBeInitialized(method.ContainingType, includeAllMembers: method.IncludeFieldInitializersInBody(), includeCurrentTypeRequiredMembers, includeBaseRequiredMembers);
1068foreach (var member in property.ContainingType.GetMembers(notNullMemberName))
1092var type = method.ContainingType;
1394&& method.ContainingType is SourceMemberContainerTypeSymbol containingType)
2574TypeSymbol possibleBase = possibleMember.ContainingType;
3527(FieldSymbol { ContainingType: { IsTupleType: true }, TupleElementIndex: var oi } originalField, FieldSymbol { ContainingType: { IsTupleType: true }, TupleElementIndex: var ui } updatedField) =>
3860var containingType = constructor?.ContainingType;
4977TypeSymbol methodContainer = method.ContainingType;
5362var containingType = this._symbol?.ContainingType;
6248var wellKnownType = wellKnownMethod.ContainingType;
6269if (implementationMethod.ContainingType.IsInterface)
6300while (!baseType.Equals(implementationMethod.ContainingType) && method is object)
6302if (baseType.Equals(method.ContainingType))
6316if (method is object && baseType.Equals(method.ContainingType))
6436method.ContainingType.IsReferenceType)
6995var type = method.ContainingType;
7702definition.ContainingType,
8037var symbolContainer = symbol.ContainingType;
8049Debug.Assert(symbol.ContainingType.IsDefinition);
10642if ((object)getMethod != null && getMethod.ContainingType.SpecialType == SpecialType.System_Nullable_T)
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
278Binder.ReportDiagnosticsIfObsolete(_diagnostics, node.EventSymbol.AssociatedField, node.Syntax, hasBaseReceiver, _containingSymbol, _containingSymbol.ContainingType, BinderFlags.None);
292Binder.ReportDiagnosticsIfObsolete(_diagnostics, node.Event, ((AssignmentExpressionSyntax)node.Syntax).Left, hasBaseReceiver, _containingSymbol, _containingSymbol.ContainingType, BinderFlags.None);
Lowering\SyntheticBoundNodeFactory.cs (9)
76_currentType = value.ContainingType;
155: this(topLevelMethod, topLevelMethod.ContainingType, node, compilationState, diagnostics, instrumentationState)
185Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2));
194TypeSymbol.Equals(CurrentFunction.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2));
812constructor.ContainingType)
1358GetMethodFromHandleMethod(ctor.ContainingType, constructorInfo),
1457if (!method.ContainingType.IsValueType || !Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.MayUseCallForStructMethod(method))
1465GetMethodFromHandleMethod(method.ContainingType, systemReflectionMethodInfo),
1481GetFieldFromHandleMethod(field.ContainingType),