Base:
property
ContainingType
Microsoft.CodeAnalysis.CSharp.Symbol.ContainingType
43 references to ContainingType
Microsoft.CodeAnalysis.CSharp (43)
Binder\Binder_Statements.cs (1)
1785
TypeSymbol.Equals(sourceProperty.
ContainingType
, fromMember.ContainingType, TypeCompareKind.AllIgnoreOptions) &&
Compiler\MethodCompiler.cs (1)
881
_moduleBeingBuiltOpt.AddSynthesizedDefinition(sourceProperty.
ContainingType
, synthesizedAccessor.GetCciAdapter());
Compiler\SynthesizedMetadataCompiler.cs (1)
111
_moduleBeingBuilt.AddSynthesizedDefinition(sourceProperty.
ContainingType
, synthesizedAccessor.GetCciAdapter());
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
662
if (this._property.
ContainingType
is SourceMemberContainerTypeSymbol { AnyMemberHasAttributes: true })
Symbols\Source\SourcePropertySymbol.cs (8)
216
if (this.
ContainingType
is SourceMemberContainerTypeSymbol { AnyMemberHasAttributes: true })
532
ContainingType
,
545
ContainingType
,
590
NamedTypeSymbol containingType =
ContainingType
;
673
var containingTypeForFileTypeCheck = this.
ContainingType
;
697
if (
ContainingType
.TypeParameters.Any(static tp => tp.Name == ParameterSymbol.ValueParameterName))
702
if (
ContainingType
.ExtensionParameter is { Name: ParameterSymbol.ValueParameterName })
708
if (this.GetIsNewExtensionMember() &&
ContainingType
.ExtensionParameter is { } extensionParameter &&
Symbols\Source\SourcePropertySymbolBase.cs (24)
307
if (
ContainingType
.IsInterface && !IsStatic)
817
if (!IsStatic &&
ContainingType
.IsReadOnly)
891
if (
ContainingType
.IsReadOnly)
913
var overriddenProperty = (PropertySymbol)this.GetLeastOverriddenMember(this.
ContainingType
);
923
ContainingType
.IsInterface &&
1037
TypeSymbol.CheckModifierMismatchOnImplementingMember(this.
ContainingType
, this, explicitlyImplementedProperty, isExplicit: true, diagnostics);
1080
Debug.Assert(!IsStatic ||
ContainingType
.IsInterface || (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier.
1082
bool isExplicitInterfaceImplementationInInterface = isExplicitInterfaceImplementation &&
ContainingType
.IsInterface;
1103
else if (IsPartial && !
ContainingType
.IsPartial())
1115
else if (IsAbstract &&
ContainingType
.TypeKind == TypeKind.Struct)
1120
else if (IsVirtual &&
ContainingType
.TypeKind == TypeKind.Struct)
1137
else if (
ContainingType
.IsSealed && this.DeclaredAccessibility.HasProtected() && !this.IsOverride)
1139
diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(
ContainingType
), location, this);
1141
else if (
ContainingType
is { IsExtension: true, ExtensionParameter.Name: "" } && !IsStatic)
1145
else if (
ContainingType
.IsStatic && !IsStatic)
1414
AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeNullableAttributeIfNecessary(this,
ContainingType
.GetNullableContextValue(), type));
1587
CSharpAttributeData.DecodeMemberNotNullAttribute<PropertyWellKnownAttributeData>(
ContainingType
, ref arguments);
1592
CSharpAttributeData.DecodeMemberNotNullWhenAttribute<PropertyWellKnownAttributeData>(
ContainingType
, ref arguments);
1605
if (
ContainingType
.IsInterface || IsExplicitInterfaceImplementation)
1875
if (!this.IsStatic && (
ContainingType
.IsRecord ||
ContainingType
.IsRecordStruct) && type.IsPointerOrFunctionPointer())
1880
else if (type.IsRefLikeOrAllowsRefLikeType() && (this.IsStatic || !this.
ContainingType
.IsRefLikeType))
1891
diagnostics.Add(ErrorFacts.GetStaticClassReturnCode(
ContainingType
.IsInterfaceType()), TypeLocation, type);
1896
diagnostics.Add(ErrorFacts.GetStaticClassParameterCode(
ContainingType
.IsInterfaceType()), TypeLocation, type);
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (4)
63
=>
ContainingType
.GetFirstLocation();
68
ContainingType
,
71
ContainingType
.GetFirstLocation(),
72
(CSharpSyntaxNode)((SourceMemberContainerTypeSymbol)
ContainingType
).SyntaxReferences[0].GetSyntax(),
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (2)
82
var usesInit = !isGet && ShouldUseInit(
ContainingType
);
86
ContainingType
,
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
260
=> _property.
ContainingType
;