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)
876
_moduleBeingBuiltOpt.AddSynthesizedDefinition(sourceProperty.
ContainingType
, synthesizedAccessor.GetCciAdapter());
Compiler\SynthesizedMetadataCompiler.cs (1)
111
_moduleBeingBuilt.AddSynthesizedDefinition(sourceProperty.
ContainingType
, synthesizedAccessor.GetCciAdapter());
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
661
if (this._property.
ContainingType
is SourceMemberContainerTypeSymbol { AnyMemberHasAttributes: true })
Symbols\Source\SourcePropertySymbol.cs (8)
215
if (this.
ContainingType
is SourceMemberContainerTypeSymbol { AnyMemberHasAttributes: true })
534
ContainingType
,
547
ContainingType
,
592
NamedTypeSymbol containingType =
ContainingType
;
675
var containingTypeForFileTypeCheck = this.
ContainingType
;
699
if (
ContainingType
.TypeParameters.Any(static tp => tp.Name == ParameterSymbol.ValueParameterName))
704
if (
ContainingType
.ExtensionParameter is { Name: ParameterSymbol.ValueParameterName })
710
if (!IsStatic && this.GetIsNewExtensionMember() &&
ContainingType
.ExtensionParameter is { } extensionParameter &&
Symbols\Source\SourcePropertySymbolBase.cs (24)
306
if (
ContainingType
.IsInterface && !IsStatic)
816
if (!IsStatic &&
ContainingType
.IsReadOnly)
890
if (
ContainingType
.IsReadOnly)
912
var overriddenProperty = (PropertySymbol)this.GetLeastOverriddenMember(this.
ContainingType
);
922
ContainingType
.IsInterface &&
1036
TypeSymbol.CheckModifierMismatchOnImplementingMember(this.
ContainingType
, this, explicitlyImplementedProperty, isExplicit: true, diagnostics);
1074
Debug.Assert(!IsStatic ||
ContainingType
.IsInterface || (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier.
1076
bool isExplicitInterfaceImplementationInInterface = isExplicitInterfaceImplementation &&
ContainingType
.IsInterface;
1097
else if (IsPartial && !
ContainingType
.IsPartial())
1109
else if (IsAbstract &&
ContainingType
.TypeKind == TypeKind.Struct)
1114
else if (IsVirtual &&
ContainingType
.TypeKind == TypeKind.Struct)
1131
else if (
ContainingType
.IsSealed && this.DeclaredAccessibility.HasProtected() && !this.IsOverride)
1133
diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(
ContainingType
), location, this);
1135
else if (
ContainingType
is { IsExtension: true, ExtensionParameter.Name: "" } && !IsStatic)
1139
else if (
ContainingType
.IsStatic && !IsStatic)
1408
AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeNullableAttributeIfNecessary(this,
ContainingType
.GetNullableContextValue(), type));
1581
CSharpAttributeData.DecodeMemberNotNullAttribute<PropertyWellKnownAttributeData>(
ContainingType
, ref arguments);
1586
CSharpAttributeData.DecodeMemberNotNullWhenAttribute<PropertyWellKnownAttributeData>(
ContainingType
, ref arguments);
1599
if (
ContainingType
.IsInterface || IsExplicitInterfaceImplementation)
1869
if (!this.IsStatic && (
ContainingType
.IsRecord ||
ContainingType
.IsRecordStruct) && type.IsPointerOrFunctionPointer())
1874
else if (type.IsRefLikeOrAllowsRefLikeType() && (this.IsStatic || !this.
ContainingType
.IsRefLikeType))
1885
diagnostics.Add(ErrorFacts.GetStaticClassReturnCode(
ContainingType
.IsInterfaceType()), TypeLocation, type);
1890
diagnostics.Add(ErrorFacts.GetStaticClassParameterCode(
ContainingType
.IsInterfaceType()), TypeLocation, type);
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (4)
62
=>
ContainingType
.GetFirstLocation();
67
ContainingType
,
70
ContainingType
.GetFirstLocation(),
71
(CSharpSyntaxNode)((SourceMemberContainerTypeSymbol)
ContainingType
).SyntaxReferences[0].GetSyntax(),
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (2)
81
var usesInit = !isGet && ShouldUseInit(
ContainingType
);
85
ContainingType
,
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
259
=> _property.
ContainingType
;