Base:
property
ContainingType
Microsoft.CodeAnalysis.CSharp.Symbol.ContainingType
47 references to ContainingType
Microsoft.CodeAnalysis.CSharp (44)
Binder\Binder_Statements.cs (1)
1808TypeSymbol.Equals(sourceProperty.ContainingType, fromMember.ContainingType, TypeCompareKind.AllIgnoreOptions) &&
Compiler\MethodCompiler.cs (1)
896_moduleBeingBuiltOpt.AddSynthesizedDefinition(sourceProperty.ContainingType, synthesizedAccessor.GetCciAdapter());
Compiler\SynthesizedMetadataCompiler.cs (1)
111_moduleBeingBuilt.AddSynthesizedDefinition(sourceProperty.ContainingType, synthesizedAccessor.GetCciAdapter());
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
662if (this._property.ContainingType is SourceMemberContainerTypeSymbol { AnyMemberHasAttributes: true })
Symbols\Source\SourcePropertySymbol.cs (8)
216if (this.ContainingType is SourceMemberContainerTypeSymbol { AnyMemberHasAttributes: true }) 532ContainingType, 545ContainingType, 590NamedTypeSymbol containingType = ContainingType; 673var containingTypeForFileTypeCheck = this.ContainingType; 697if (ContainingType.TypeParameters.Any(static tp => tp.Name == ParameterSymbol.ValueParameterName)) 702if (ContainingType.ExtensionParameter is { Name: ParameterSymbol.ValueParameterName }) 708if (this.GetIsNewExtensionMember() && ContainingType.ExtensionParameter is { } extensionParameter &&
Symbols\Source\SourcePropertySymbolBase.cs (25)
307if (ContainingType.IsInterface && !IsStatic) 817if (!IsStatic && ContainingType.IsReadOnly) 891if (ContainingType.IsReadOnly) 913var overriddenProperty = (PropertySymbol)this.GetLeastOverriddenMember(this.ContainingType); 923ContainingType.IsInterface && 1037TypeSymbol.CheckModifierMismatchOnImplementingMember(this.ContainingType, this, explicitlyImplementedProperty, isExplicit: true, diagnostics); 1082Debug.Assert(!IsStatic || ContainingType.IsInterface || (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier. 1084bool isExplicitInterfaceImplementationInInterface = isExplicitInterfaceImplementation && ContainingType.IsInterface; 1105else if (IsPartial && !ContainingType.IsPartial()) 1117else if (IsAbstract && ContainingType.TypeKind == TypeKind.Struct) 1122else if (IsVirtual && ContainingType.TypeKind == TypeKind.Struct) 1139else if (ContainingType.IsSealed && this.DeclaredAccessibility.HasProtected() && !this.IsOverride) 1141diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(ContainingType), location, this); 1143else if (ContainingType is { IsExtension: true, ExtensionParameter.Name: "" } && !IsStatic) 1147else if (ContainingType.IsStatic && !IsStatic) 1416AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeNullableAttributeIfNecessary(this, ContainingType.GetNullableContextValue(), type)); 1433AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeExtensionMarkerAttribute(this, ((SourceNamedTypeSymbol)this.ContainingType).ExtensionMarkerName)); 1595CSharpAttributeData.DecodeMemberNotNullAttribute<PropertyWellKnownAttributeData>(ContainingType, ref arguments); 1600CSharpAttributeData.DecodeMemberNotNullWhenAttribute<PropertyWellKnownAttributeData>(ContainingType, ref arguments); 1613if (ContainingType.IsInterface || IsExplicitInterfaceImplementation) 1883if (!this.IsStatic && (ContainingType.IsRecord || ContainingType.IsRecordStruct) && type.IsPointerOrFunctionPointer()) 1888else if (type.IsRefLikeOrAllowsRefLikeType() && (this.IsStatic || !this.ContainingType.IsRefLikeType)) 1899diagnostics.Add(ErrorFacts.GetStaticClassReturnCode(ContainingType.IsInterfaceType()), TypeLocation, type); 1904diagnostics.Add(ErrorFacts.GetStaticClassParameterCode(ContainingType.IsInterfaceType()), TypeLocation, type);
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (4)
63=> ContainingType.GetFirstLocation(); 68ContainingType, 71ContainingType.GetFirstLocation(), 72(CSharpSyntaxNode)((SourceMemberContainerTypeSymbol)ContainingType).SyntaxReferences[0].GetSyntax(),
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (2)
82var usesInit = !isGet && ShouldUseInit(ContainingType); 86ContainingType,
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
260=> _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);