Base:
property
ContainingType
Microsoft.CodeAnalysis.CSharp.Symbol.ContainingType
35 references to ContainingType
Microsoft.CodeAnalysis.CSharp (32)
Binder\Binder_Statements.cs (1)
1779
TypeSymbol.Equals(sourceProperty.
ContainingType
, fromMember.ContainingType, TypeCompareKind.AllIgnoreOptions) &&
Compiler\MethodCompiler.cs (1)
861
_moduleBeingBuiltOpt.AddSynthesizedDefinition(sourceProperty.
ContainingType
, synthesizedAccessor.GetCciAdapter());
Compiler\SynthesizedMetadataCompiler.cs (1)
102
_moduleBeingBuilt.AddSynthesizedDefinition(sourceProperty.
ContainingType
, synthesizedAccessor.GetCciAdapter());
Symbols\Source\SourcePropertySymbol.cs (6)
406
ContainingType
,
419
ContainingType
,
462
if (type.Type.HasFileLocalTypes() && !
ContainingType
.HasFileLocalTypes())
464
diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, Location, type.Type,
ContainingType
);
544
else if (param.Type.HasFileLocalTypes() && !this.
ContainingType
.HasFileLocalTypes())
546
diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, Location, param.Type, this.
ContainingType
);
Symbols\Source\SourcePropertySymbolBase.cs (16)
667
CheckInitializer(IsAutoProperty,
ContainingType
.IsInterface, IsStatic, Location, diagnostics);
682
if (
ContainingType
.IsReadOnly)
810
TypeSymbol.CheckNullableReferenceTypeAndScopedMismatchOnImplementingMember(this.
ContainingType
, this, explicitlyImplementedProperty, isExplicit: true, diagnostics);
847
Debug.Assert(!IsStatic ||
ContainingType
.IsInterface || (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier.
849
bool isExplicitInterfaceImplementationInInterface = isExplicitInterfaceImplementation &&
ContainingType
.IsInterface;
870
else if (IsAbstract &&
ContainingType
.TypeKind == TypeKind.Struct)
875
else if (IsVirtual &&
ContainingType
.TypeKind == TypeKind.Struct)
892
else if (
ContainingType
.IsSealed && this.DeclaredAccessibility.HasProtected() && !this.IsOverride)
894
diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(
ContainingType
), location, this);
896
else if (
ContainingType
.IsStatic && !IsStatic)
1143
AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeNullableAttributeIfNecessary(this,
ContainingType
.GetNullableContextValue(), type));
1299
CSharpAttributeData.DecodeMemberNotNullAttribute<PropertyWellKnownAttributeData>(
ContainingType
, ref arguments);
1304
CSharpAttributeData.DecodeMemberNotNullWhenAttribute<PropertyWellKnownAttributeData>(
ContainingType
, ref arguments);
1530
else if (this.IsAutoPropertyWithGetAccessor && type.IsRefLikeType && (this.IsStatic || !this.
ContainingType
.IsRefLikeType))
1540
diagnostics.Add(ErrorFacts.GetStaticClassReturnCode(
ContainingType
.IsInterfaceType()), TypeLocation, type);
1545
diagnostics.Add(ErrorFacts.GetStaticClassParameterCode(
ContainingType
.IsInterfaceType()), TypeLocation, type);
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (4)
56
=>
ContainingType
.Locations[0];
61
ContainingType
,
64
ContainingType
.Locations[0],
65
(CSharpSyntaxNode)((SourceMemberContainerTypeSymbol)
ContainingType
).SyntaxReferences[0].GetSyntax(),
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (2)
74
var usesInit = !isGet && ShouldUseInit(
ContainingType
);
78
ContainingType
,
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
146
=> _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
);