Base:
property
ContainingType
Microsoft.CodeAnalysis.CSharp.Symbol.ContainingType
35 references to ContainingType
Microsoft.CodeAnalysis.CSharp (32)
Binder\Binder_Statements.cs (1)
1779TypeSymbol.Equals(sourceProperty.ContainingType, fromMember.ContainingType, TypeCompareKind.AllIgnoreOptions) &&
Compiler\MethodCompiler.cs (1)
861_moduleBeingBuiltOpt.AddSynthesizedDefinition(sourceProperty.ContainingType, synthesizedAccessor.GetCciAdapter());
Compiler\SynthesizedMetadataCompiler.cs (1)
102_moduleBeingBuilt.AddSynthesizedDefinition(sourceProperty.ContainingType, synthesizedAccessor.GetCciAdapter());
Symbols\Source\SourcePropertySymbol.cs (6)
406ContainingType, 419ContainingType, 462if (type.Type.HasFileLocalTypes() && !ContainingType.HasFileLocalTypes()) 464diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, Location, type.Type, ContainingType); 544else if (param.Type.HasFileLocalTypes() && !this.ContainingType.HasFileLocalTypes()) 546diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, Location, param.Type, this.ContainingType);
Symbols\Source\SourcePropertySymbolBase.cs (16)
667CheckInitializer(IsAutoProperty, ContainingType.IsInterface, IsStatic, Location, diagnostics); 682if (ContainingType.IsReadOnly) 810TypeSymbol.CheckNullableReferenceTypeAndScopedMismatchOnImplementingMember(this.ContainingType, this, explicitlyImplementedProperty, isExplicit: true, diagnostics); 847Debug.Assert(!IsStatic || ContainingType.IsInterface || (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier. 849bool isExplicitInterfaceImplementationInInterface = isExplicitInterfaceImplementation && ContainingType.IsInterface; 870else if (IsAbstract && ContainingType.TypeKind == TypeKind.Struct) 875else if (IsVirtual && ContainingType.TypeKind == TypeKind.Struct) 892else if (ContainingType.IsSealed && this.DeclaredAccessibility.HasProtected() && !this.IsOverride) 894diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(ContainingType), location, this); 896else if (ContainingType.IsStatic && !IsStatic) 1143AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeNullableAttributeIfNecessary(this, ContainingType.GetNullableContextValue(), type)); 1299CSharpAttributeData.DecodeMemberNotNullAttribute<PropertyWellKnownAttributeData>(ContainingType, ref arguments); 1304CSharpAttributeData.DecodeMemberNotNullWhenAttribute<PropertyWellKnownAttributeData>(ContainingType, ref arguments); 1530else if (this.IsAutoPropertyWithGetAccessor && type.IsRefLikeType && (this.IsStatic || !this.ContainingType.IsRefLikeType)) 1540diagnostics.Add(ErrorFacts.GetStaticClassReturnCode(ContainingType.IsInterfaceType()), TypeLocation, type); 1545diagnostics.Add(ErrorFacts.GetStaticClassParameterCode(ContainingType.IsInterfaceType()), TypeLocation, type);
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (4)
56=> ContainingType.Locations[0]; 61ContainingType, 64ContainingType.Locations[0], 65(CSharpSyntaxNode)((SourceMemberContainerTypeSymbol)ContainingType).SyntaxReferences[0].GetSyntax(),
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (2)
74var usesInit = !isGet && ShouldUseInit(ContainingType); 78ContainingType,
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
146=> _property.ContainingType;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Symbols\Source\ExpressionBodiedPropertyTests.cs (1)
394var implements = prop.ContainingType.FindImplementationForInterfaceMember(iP);
Symbols\Source\RecordTests.cs (2)
161Assert.Equal(c, x.ContainingType); 195Assert.Equal(c, y.ContainingType);