Base:
property
ContainingType
Microsoft.CodeAnalysis.CSharp.Symbol.ContainingType
48 references to ContainingType
Microsoft.CodeAnalysis.CSharp (45)
Binder\Binder_Statements.cs (1)
1815
TypeSymbol.Equals(sourceProperty.
ContainingType
, fromMember.ContainingType, TypeCompareKind.AllIgnoreOptions) &&
Compiler\MethodCompiler.cs (1)
899
_moduleBeingBuiltOpt.AddSynthesizedDefinition(sourceProperty.
ContainingType
, synthesizedAccessor.GetCciAdapter());
Compiler\SynthesizedMetadataCompiler.cs (1)
111
_moduleBeingBuilt.AddSynthesizedDefinition(sourceProperty.
ContainingType
, synthesizedAccessor.GetCciAdapter());
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
711
if (this._property.
ContainingType
is SourceMemberContainerTypeSymbol { AnyMemberHasAttributes: true })
Symbols\Source\SourcePropertySymbol.cs (8)
215
if (this.
ContainingType
is SourceMemberContainerTypeSymbol { AnyMemberHasAttributes: true })
531
ContainingType
,
544
ContainingType
,
589
NamedTypeSymbol containingType =
ContainingType
;
672
var containingTypeForFileTypeCheck = this.
ContainingType
;
696
if (
ContainingType
.TypeParameters.Any(static tp => tp.Name == ParameterSymbol.ValueParameterName))
701
if (
ContainingType
.ExtensionParameter is { Name: ParameterSymbol.ValueParameterName })
707
if (this.IsExtensionBlockMember() &&
ContainingType
.ExtensionParameter is { } extensionParameter &&
Symbols\Source\SourcePropertySymbolBase.cs (25)
307
if (
ContainingType
.IsInterface && !IsStatic)
819
if (!IsStatic &&
ContainingType
.IsReadOnly)
893
if (
ContainingType
.IsReadOnly)
915
var overriddenProperty = (PropertySymbol)this.GetLeastOverriddenMember(this.
ContainingType
);
925
ContainingType
.IsInterface &&
1040
TypeSymbol.CheckModifierMismatchOnImplementingMember(this.
ContainingType
, this, explicitlyImplementedProperty, isExplicit: true, diagnostics);
1091
Debug.Assert(!IsStatic ||
ContainingType
.IsInterface || (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier.
1093
bool isExplicitInterfaceImplementationInInterface = isExplicitInterfaceImplementation &&
ContainingType
.IsInterface;
1114
else if (IsPartial && !
ContainingType
.IsPartial())
1126
else if (IsAbstract &&
ContainingType
.TypeKind == TypeKind.Struct)
1131
else if (IsVirtual &&
ContainingType
.TypeKind == TypeKind.Struct)
1148
else if (
ContainingType
.IsSealed && this.DeclaredAccessibility.HasProtected() && !this.IsOverride)
1150
diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(
ContainingType
), location, this);
1152
else if (
ContainingType
is { IsExtension: true, ExtensionParameter.Name: "" } && !IsStatic)
1156
else if (
ContainingType
.IsStatic && !IsStatic)
1425
AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeNullableAttributeIfNecessary(this,
ContainingType
.GetNullableContextValue(), type));
1447
AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeExtensionMarkerAttribute(this, ((SourceNamedTypeSymbol)this.
ContainingType
).ExtensionMarkerName));
1609
CSharpAttributeData.DecodeMemberNotNullAttribute<PropertyWellKnownAttributeData>(
ContainingType
, ref arguments);
1614
CSharpAttributeData.DecodeMemberNotNullWhenAttribute<PropertyWellKnownAttributeData>(
ContainingType
, ref arguments);
1627
if (
ContainingType
.IsInterface || IsExplicitInterfaceImplementation)
1901
if (!this.IsStatic && (
ContainingType
.IsRecord ||
ContainingType
.IsRecordStruct) && type.IsPointerOrFunctionPointer())
1906
else if (type.IsRefLikeOrAllowsRefLikeType() && (this.IsStatic || !this.
ContainingType
.IsRefLikeType))
1917
diagnostics.Add(ErrorFacts.GetStaticClassReturnCode(
ContainingType
.IsInterfaceType()), TypeLocation, type);
1922
diagnostics.Add(ErrorFacts.GetStaticClassParameterCode(
ContainingType
.IsInterfaceType()), TypeLocation, type);
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (4)
64
=>
ContainingType
.GetFirstLocation();
69
ContainingType
,
72
ContainingType
.GetFirstLocation(),
73
(CSharpSyntaxNode)((SourceMemberContainerTypeSymbol)
ContainingType
).SyntaxReferences[0].GetSyntax(),
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (2)
84
var usesInit = !isGet && ShouldUseInit(
ContainingType
);
88
ContainingType
,
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
271
=> _property.
ContainingType
;
Symbols\Synthesized\SynthesizedUnionValuePropertySymbol.cs (1)
59
ContainingType
,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Symbols\Source\ExpressionBodiedPropertyTests.cs (1)
394
var implements = prop.
ContainingType
.FindImplementationForInterfaceMember(iP);
Symbols\Source\RecordTests.cs (2)
161
Assert.Equal(c, x.
ContainingType
);
195
Assert.Equal(c, y.
ContainingType
);