Base:
property
ContainingType
Microsoft.CodeAnalysis.CSharp.Symbol.ContainingType
47 references to ContainingType
Microsoft.CodeAnalysis.CSharp (44)
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)
663
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)
817
if (!IsStatic &&
ContainingType
.IsReadOnly)
891
if (
ContainingType
.IsReadOnly)
913
var overriddenProperty = (PropertySymbol)this.GetLeastOverriddenMember(this.
ContainingType
);
923
ContainingType
.IsInterface &&
1038
TypeSymbol.CheckModifierMismatchOnImplementingMember(this.
ContainingType
, this, explicitlyImplementedProperty, isExplicit: true, diagnostics);
1090
Debug.Assert(!IsStatic ||
ContainingType
.IsInterface || (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier.
1092
bool isExplicitInterfaceImplementationInInterface = isExplicitInterfaceImplementation &&
ContainingType
.IsInterface;
1113
else if (IsPartial && !
ContainingType
.IsPartial())
1125
else if (IsAbstract &&
ContainingType
.TypeKind == TypeKind.Struct)
1130
else if (IsVirtual &&
ContainingType
.TypeKind == TypeKind.Struct)
1147
else if (
ContainingType
.IsSealed && this.DeclaredAccessibility.HasProtected() && !this.IsOverride)
1149
diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(
ContainingType
), location, this);
1151
else if (
ContainingType
is { IsExtension: true, ExtensionParameter.Name: "" } && !IsStatic)
1155
else if (
ContainingType
.IsStatic && !IsStatic)
1436
AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeNullableAttributeIfNecessary(this,
ContainingType
.GetNullableContextValue(), type));
1459
AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeExtensionMarkerAttribute(this, ((SourceNamedTypeSymbol)this.
ContainingType
).ExtensionMarkerName));
1621
CSharpAttributeData.DecodeMemberNotNullAttribute<PropertyWellKnownAttributeData>(
ContainingType
, ref arguments);
1626
CSharpAttributeData.DecodeMemberNotNullWhenAttribute<PropertyWellKnownAttributeData>(
ContainingType
, ref arguments);
1639
if (
ContainingType
.IsInterface || IsExplicitInterfaceImplementation)
1914
if (!this.IsStatic && (
ContainingType
.IsRecord ||
ContainingType
.IsRecordStruct) && type.IsPointerOrFunctionPointer())
1919
else if (type.IsRefLikeOrAllowsRefLikeType() && (this.IsStatic || !this.
ContainingType
.IsRefLikeType))
1930
diagnostics.Add(ErrorFacts.GetStaticClassReturnCode(
ContainingType
.IsInterfaceType()), TypeLocation, type);
1935
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)
268
=> _property.
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
);