9 types derived from PropertySymbol
Microsoft.CodeAnalysis.CSharp (9)
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
16internal class SynthesizedStateMachineProperty : PropertySymbol, ISynthesizedMethodBodyImplementationSymbol
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
19internal sealed class AnonymousTypePropertySymbol : PropertySymbol
Symbols\ErrorPropertySymbol.cs (1)
25internal sealed class ErrorPropertySymbol : PropertySymbol
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
29: PropertySymbol
Symbols\SignatureOnlyPropertySymbol.cs (1)
19internal sealed class SignatureOnlyPropertySymbol : PropertySymbol
Symbols\Source\SourcePropertySymbolBase.cs (1)
22internal abstract class SourcePropertySymbolBase : PropertySymbol, IAttributeTargetSymbol
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
10internal sealed class SynthesizedReadOnlyListProperty : PropertySymbol
Symbols\Synthesized\SynthesizedEmbeddedAttributePropertySymbol.cs (1)
12internal sealed class SynthesizedEmbeddedAttributePropertySymbol : PropertySymbol
Symbols\Wrapped\WrappedPropertySymbol.cs (1)
23internal abstract class WrappedPropertySymbol : PropertySymbol
647 references to PropertySymbol
Microsoft.CodeAnalysis.CSharp (647)
Binder\Binder.ValueChecks.cs (17)
68internal static MethodInfo Create(PropertySymbol property) 76internal static MethodInfo Create(PropertySymbol property, AccessorKind accessorKind) => 1998var propertySymbol = GetPropertySymbol(expr, out receiver, out propertySyntax); 2884case PropertySymbol property: 3854var indexerSymbol = indexerAccess.Indexer; 3869var indexerSymbol = indexerAccess.Indexer; 4129var indexerSymbol = indexerAccess.Indexer; 4153var indexerSymbol = indexerAccess.Indexer; 4241var propertySymbol = propertyAccess.PropertySymbol; 4495var indexerSymbol = indexerAccess.Indexer; 4510var indexerSymbol = indexerAccess.Indexer; 4937PropertySymbol { IsIndexer: true } indexer => getIndexerEscape(indexer, left, rightEscape), 4938PropertySymbol property => getPropertyEscape(property, rightEscape), 4955PropertySymbol indexer, 5012PropertySymbol property, 5220var indexerSymbol = indexerAccess.Indexer; 5239var indexerSymbol = indexerAccess.Indexer;
Binder\Binder_AnonymousTypes.cs (1)
126declarators.Add(new BoundAnonymousPropertyDeclaration(fieldSyntaxNodes[i], (PropertySymbol)symbol, field.Type));
Binder\Binder_Attributes.cs (6)
536var propertySymbol = (PropertySymbol)namedArgumentNameSymbol; 586var propertySymbol = namedArgumentNameSymbol as PropertySymbol; 644var propertySymbol = ((PropertySymbol)namedArgumentNameSymbol).GetLeastOverriddenProperty(this.ContainingType);
Binder\Binder_Await.cs (3)
59out PropertySymbol? isCompleted, 273out PropertySymbol? isCompleted, 630private bool GetIsCompletedProperty(TypeSymbol awaiterType, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, [NotNullWhen(true)] out PropertySymbol? isCompletedProperty)
Binder\Binder_Crefs.cs (1)
1016explicitInterfaceImplementations: ImmutableArray<PropertySymbol>.Empty);
Binder\Binder_Expressions.cs (45)
1567ContainingMember() is MethodSymbol { MethodKind: MethodKind.PropertyGet or MethodKind.PropertySet, AssociatedSymbol: PropertySymbol { IsIndexer: false } }) 2192return BindPropertyAccess(node, receiver, (PropertySymbol)symbol, diagnostics, resultKind, hasErrors: isError); 6189PropertySymbol propertySymbol, 7730leftType = ((PropertySymbol)leftSymbol).Type; 8263case PropertySymbol propertySymbol: 8557resultType = ((PropertySymbol)symbolOpt).Type; 8712result = BindPropertyAccess(node, left, (PropertySymbol)symbol, diagnostics, lookupResult.Kind, hasErrors: wasError); 8873OverloadResolutionResult<PropertySymbol>? propertyResult = arity != 0 || acceptOnlyMethods ? null : resolveProperties(left, lookupResult, binder, ref actualReceiverArguments, ref useSiteInfo); 9031static OverloadResolutionResult<PropertySymbol>? resolveProperties( 9038ArrayBuilder<PropertySymbol>? properties = null; 9041if (member is PropertySymbol property) 9043properties ??= ArrayBuilder<PropertySymbol>.GetInstance(); 9059OverloadResolutionResult<PropertySymbol> overloadResolutionResult = OverloadResolutionResult<PropertySymbol>.GetInstance(); 9070OverloadResolutionResult<PropertySymbol> propertyResult, 9090PropertySymbol representativeProperty = propertyResult.PickRepresentativeMember(); 9300PropertySymbol propertySymbol, 9595foreach (PropertySymbol property in members) 9939return BindDynamicIndexer(node, expr, arguments, ImmutableArray<PropertySymbol>.Empty, diagnostics); 10263ArrayBuilder<PropertySymbol> indexerGroup = ArrayBuilder<PropertySymbol>.GetInstance(); 10267indexerGroup.Add((PropertySymbol)symbol); 10278private static readonly Func<PropertySymbol, bool> s_isIndexedPropertyWithNonOptionalArguments = property => 10329private BoundExpression BindIndexedPropertyAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<PropertySymbol> propertyGroup, AnalyzedArguments arguments, BindingDiagnosticBag diagnostics) 10334var properties = ArrayBuilder<PropertySymbol>.GetInstance(); 10346ImmutableArray<PropertySymbol> applicableProperties, 10389ArrayBuilder<PropertySymbol> propertyGroup, 10394OverloadResolutionResult<PropertySymbol> overloadResolutionResult = OverloadResolutionResult<PropertySymbol>.GetInstance(); 10429ArrayBuilder<PropertySymbol> propertyGroup, 10431OverloadResolutionResult<PropertySymbol> overloadResolutionResult, 10442ImmutableArray<PropertySymbol> candidates = propertyGroup.ToImmutable(); 10457var candidate = candidates[0]; 10478PropertySymbol property = (candidates.Length == 1) ? candidates[0] : CreateErrorPropertySymbol(candidates); 10491MemberResolutionResult<PropertySymbol> resolutionResult = overloadResolutionResult.ValidResult; 10492PropertySymbol property = resolutionResult.Member; 10503this.CheckAndCoerceArguments<PropertySymbol>(syntax, resolutionResult, analyzedArguments, diagnostics, receiver, invokedAsExtensionMethod: false, out argsToParams); 10686candidate is PropertySymbol property && 10696var properties = ArrayBuilder<PropertySymbol>.GetInstance(); 10803if (TryLookupLengthOrCount(syntax, receiverPlaceholder.Type, lookupResult, out var lengthOrCountProperty, diagnostics)) 10823[NotNullWhen(true)] out PropertySymbol? lengthOrCountProperty, 10835bool tryLookupLengthOrCount(SyntaxNode syntax, string propertyName, [NotNullWhen(true)] out PropertySymbol? valid, BindingDiagnosticBag diagnostics) 10851lookupResult.Symbols[0] is PropertySymbol property && 10870private ErrorPropertySymbol CreateErrorPropertySymbol(ImmutableArray<PropertySymbol> propertyGroup) 10873var candidate = propertyGroup[0];
Binder\Binder_Invocation.cs (3)
1386internal ThreeState ReceiverIsSubjectToCloning(BoundExpression? receiver, PropertySymbol property) 2138private ImmutableArray<BoundExpression> BuildArgumentsForErrorRecovery(AnalyzedArguments analyzedArguments, ImmutableArray<PropertySymbol> properties) 2141foreach (var p in properties)
Binder\Binder_Lookup.cs (3)
1601var property = ((PropertySymbol)symbol).GetLeastOverriddenProperty(this.ContainingType); 1791type = ((PropertySymbol)symbol).Type;
Binder\Binder_Patterns.cs (24)
36internal static PropertySymbol? GetUnionTypeValueProperty(NamedTypeSymbol inputUnionType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 48if (isSuitableProperty(member, out PropertySymbol? valueProperty)) 64static PropertySymbol? reportDiagnosticAndReturnProperty(NamedTypeSymbol memberProvider, PropertySymbol? valueProperty, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 79static bool isSuitableProperty(Symbol m, [NotNullWhen(true)] out PropertySymbol? valueProperty) 81if (m is PropertySymbol prop && hasUnionValueSignature(prop)) 91static bool hasUnionValueSignature(PropertySymbol property) 105private delegate bool IsSuitableUnionProperty(Symbol m, [NotNullWhen(true)] out PropertySymbol? member); 107private static PropertySymbol? TryGetOwnOrInheritedUnionProperty(NamedTypeSymbol inputUnionType, string memberName, IsSuitableUnionProperty isSuitableUnionMember, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 113if (getMemberDeclaredInType(declaringType, memberName, isSuitableUnionMember, out PropertySymbol? member)) 137static bool getMemberDeclaredInType(NamedTypeSymbol declaringType, string memberName, IsSuitableUnionProperty isSuitableUnionMember, [NotNullWhen(true)] out PropertySymbol? member) 152internal static PropertySymbol? GetUnionTypeValuePropertyNoUseSiteDiagnostics(NamedTypeSymbol inputUnionType) 163internal static PropertySymbol? GetUnionTypeHasValueProperty(NamedTypeSymbol inputUnionType) 173if (isSuitableProperty(member, out PropertySymbol? valueProperty)) 187static PropertySymbol? checkAndReturnProperty(PropertySymbol? hasValueProperty) 197static bool isSuitableProperty(Symbol m, [NotNullWhen(true)] out PropertySymbol? hasValueProperty) 199if (m is PropertySymbol prop && hasHasValueSignature(prop)) 209static bool hasHasValueSignature(PropertySymbol property) 437internal static bool IsUnionTypeHasValueProperty(NamedTypeSymbol unionType, PropertySymbol property) 807private bool IsCountableAndIndexable(SyntaxNode node, TypeSymbol inputType, out PropertySymbol? lengthProperty) 824hasErrors |= !TryGetSpecialTypeMember(Compilation, SpecialMember.System_Array__Length, node, diagnostics, out PropertySymbol lengthProperty); 2160isLengthOrCount = IsCountableAndIndexable(node, receiverType, out PropertySymbol? lengthProperty) && 2213case PropertySymbol property:
Binder\Binder_Statements.cs (4)
1666internal static PropertySymbol GetPropertySymbol(BoundExpression expr, out BoundExpression receiver, out SyntaxNode propertySyntax) 1675PropertySymbol propertySymbol; 1804private static bool AccessingAutoPropertyFromConstructor(BoundExpression? receiver, PropertySymbol propertySymbol, Symbol fromMember, AccessorKind accessorKind) 1820private static bool HasSynthesizedBackingField(PropertySymbol propertySymbol, [NotNullWhen(true)] out SourcePropertySymbolBase? sourcePropertyDefinition)
Binder\Binder_Symbols.cs (2)
1629private static readonly Func<Symbol, PropertySymbol> s_toPropertySymbolFunc = s => (PropertySymbol)s;
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1293PropertySymbol property = GetPropertySymbol(propertyDeclSyntax, outerBinder);
Binder\DecisionDagBuilder.cs (10)
427Debug.Assert(unionValue.Symbol is PropertySymbol); 428var property = (PropertySymbol)unionValue.Symbol; 498var getLengthProperty = (PropertySymbol)pattern.GetLengthMethod.AssociatedSymbol; 500var getItemProperty = (PropertySymbol)pattern.GetItemMethod.AssociatedSymbol; 744if (inputInfo.UnionValue is { } unionValue && Binder.GetUnionTypeHasValueProperty((NamedTypeSymbol)inputInfo.DagTemp.Type) is PropertySymbol hasValue) 999if (subpattern.Member is { Symbol: PropertySymbol { Name: WellKnownMemberNames.ValuePropertyName } property, Receiver: var receiver } member) 1072case PropertySymbol property:
Binder\DecisionDagBuilder_ListPatterns.cs (1)
44var lengthProperty = Binder.GetPropertySymbol(list.LengthAccess, out _, out _);
Binder\ForEachLoopBinder.cs (2)
1057builder.ElementTypeWithAnnotations = ((PropertySymbol)builder.CurrentPropertyGetter.AssociatedSymbol).TypeWithAnnotations; 1704MethodSymbol currentPropertyGetterCandidate = ((PropertySymbol)lookupSymbol).GetOwnOrInheritedGetMethod();
Binder\LocalBinderFactory.cs (2)
314PropertySymbol property => property.Parameters, 330case PropertySymbol property:
Binder\RefSafetyAnalysis.cs (1)
1057var indexer = node.Indexer;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (5)
165ArrayBuilder<PropertySymbol> indexers, 168OverloadResolutionResult<PropertySymbol> result, 546case PropertySymbol property: 1473return ((PropertySymbol)member).HidesBasePropertiesByName; 4403else if (member is PropertySymbol property)
Binder\UnionMatchingRewriter.cs (1)
60PropertySymbol? valueProperty = Binder.GetUnionTypeValuePropertyNoUseSiteDiagnostics((NamedTypeSymbol)unionMatchingInputType.StrippedType());
BoundTree\BoundExpression.cs (1)
384foreach (var indexer in ApplicableIndexers)
BoundTree\BoundExpressionExtensions.cs (1)
71PropertySymbol f => f.RefKind,
BoundTree\BoundTreeRewriter.cs (3)
107public virtual PropertySymbol? VisitPropertySymbol(PropertySymbol? symbol) => symbol; 141return VisitPropertySymbol((PropertySymbol)symbol);
BoundTree\Constructors.cs (4)
275PropertySymbol indexer, 279ImmutableArray<PropertySymbol> originalIndexers) 301PropertySymbol indexer, 316PropertySymbol indexer,
Compilation\CSharpSemanticModel.cs (6)
3499ImmutableArray<PropertySymbol> originalIndexersOpt = indexerAccess.OriginalIndexersOpt; 3664memberGroup = dynamicIndexer.ApplicableIndexers.Cast<PropertySymbol, Symbol>(); 4141PropertySymbol indexer = (PropertySymbol)symbol; 4428propertyGroup = boundNode.Properties.Cast<PropertySymbol, Symbol>(); 4661if (singleLookupResult.Symbol is not (MethodSymbol or PropertySymbol))
Compilation\InitializerSemanticModel.cs (1)
49internal static InitializerSemanticModel Create(SyntaxTreeSemanticModel containingSemanticModel, CSharpSyntaxNode syntax, PropertySymbol propertySymbol, Binder rootBinder)
Compilation\MemberSemanticModel.cs (1)
1028currentProperty: ((PropertySymbol)enumeratorInfoOpt.CurrentPropertyGetter?.AssociatedSymbol).GetPublicSymbol(),
Compilation\SyntaxTreeSemanticModel.cs (3)
1559return ((PropertySymbol)GetDeclaredMemberSymbol(declarationSyntax)).GetPublicSymbol(); 1570return ((PropertySymbol)GetDeclaredMemberSymbol(declarationSyntax)).GetPublicSymbol(); 2114var property = (GetDeclaredSymbol(memberDecl, cancellationToken) as IPropertySymbol).GetSymbol();
Compiler\ClsComplianceChecker.cs (9)
357public override void VisitProperty(PropertySymbol symbol) 489PropertySymbol property = (PropertySymbol)symbol; 688startPos = ((PropertySymbol)associated).ParameterCount; 725type = ((PropertySymbol)symbol).Type; 1341var pX = (PropertySymbol)x; 1345var pY = (PropertySymbol)y;
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
566parameters = ((PropertySymbol)memberSymbol).Parameters;
Compiler\MethodCompiler.cs (1)
912public override object VisitProperty(PropertySymbol symbol, TypeCompilationState argument)
Compiler\SynthesizedMetadataCompiler.cs (1)
103public override void VisitProperty(PropertySymbol symbol)
DocumentationComments\DocumentationCommentIDVisitor.cs (1)
61public override object VisitProperty(PropertySymbol symbol, StringBuilder builder)
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
124public override object VisitProperty(PropertySymbol symbol, StringBuilder builder)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (3)
443public override Symbol? VisitProperty(PropertySymbol symbol) 727private bool ArePropertiesEqual(PropertySymbol property, PropertySymbol other)
Emitter\Model\AttributeDataAdapter.cs (1)
171type = ((PropertySymbol)symbol).Type;
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
691foreach (PropertySymbol property in AdaptedNamedTypeSymbol.GetPropertiesToEmit()) 1055internal virtual IEnumerable<PropertySymbol> GetPropertiesToEmit() 1063yield return (PropertySymbol)m;
Emitter\Model\PropertySymbolAdapter.cs (2)
342internal PropertySymbolAdapter(PropertySymbol underlyingPropertySymbol) 354internal PropertySymbol AdaptedPropertySymbol { get; }
Emitter\NoPia\EmbeddedType.cs (1)
307TypeManager.EmbedProperty(this, ((PropertySymbol)s).GetCciAdapter(), syntaxNodeOpt, diagnostics);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
567EmbedProperty(type, ((PropertySymbol)propertyOrEvent).GetCciAdapter(), syntaxNodeOpt, diagnostics);
FlowAnalysis\AbstractFlowPass.cs (10)
2146var property = left.PropertySymbol; 2201var property = left.PropertySymbol; 2220var property = left.PropertySymbol; 2271var property = node.PropertySymbol; 2837var property = left.PropertySymbol; 3625var property = (PropertySymbol)node.MemberSymbol; 3732private static MethodSymbol GetReadMethod(PropertySymbol property) => 3735private static MethodSymbol GetWriteMethod(PropertySymbol property) => 3816var symbol = propertyAccessOpt.PropertySymbol;
FlowAnalysis\DefiniteAssignment.cs (4)
357case (FieldSymbol or PropertySymbol) and { IsStatic: false, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } }: 1059var propSymbol = propAccess.PropertySymbol; 1391var property = propertyAccess.PropertySymbol; 2687var property = node.PropertySymbol;
FlowAnalysis\NullableWalker.cs (41)
705predicate: member => member is PropertySymbol { IsRequired: true }, 708var property = (PropertySymbol)member; 783symbol = (Symbol?)(f.AssociatedSymbol as PropertySymbol) ?? f; 794case PropertySymbol p when forcePropertyAnalysis: 866case PropertySymbol { IsRequired: true }: 868case PropertySymbol: 981var prop = symbolToInitialize as PropertySymbol ?? (symbolToInitialize as FieldSymbol)?.AssociatedSymbol as PropertySymbol; 1018if (requiredMember is PropertySymbol { IsAbstract: true } abstractProperty) 1021&& isFilterableOverrideOfAbstractProperty((PropertySymbol)overridingMember)) 1043var property = (PropertySymbol)requiredMember; 1068static bool isFilterableOverrideOfAbstractProperty(PropertySymbol property) 2067case PropertySymbol { Name: WellKnownMemberNames.ValuePropertyName } property when 2088case PropertySymbol: 2137var propSymbol = propAccess.PropertySymbol; 2848if (method is SourcePropertyAccessorSymbol { AssociatedSymbol: PropertySymbol prop } && (object)backingField.AssociatedSymbol == prop) 4451if (isSuitableUnionConstruction(type, constructor, out PropertySymbol? valueProperty)) 4461static bool isSuitableUnionConstruction(TypeSymbol type, [NotNullWhen(true)] MethodSymbol? constructor, [NotNullWhen(true)] out PropertySymbol? valueProperty) 4494private void SetUnionValueStateFromConstructorArgument(BoundExpression argument, TypeWithState argumentTypeWithState, int containingSlot, PropertySymbol valueProperty) 4604ImmutableArray<ParameterSymbol> parameters = ((PropertySymbol?)symbol)?.Parameters ?? default; 4686argumentsCompletion?.Invoke(argumentResults, ((PropertySymbol?)symbol)?.Parameters ?? default, null); 4712if (symbol is not PropertySymbol { IsStatic: false } property 5049var property = AnonymousTypeManager.GetAnonymousTypeProperty(anonymousType, i); 5070static BoundAnonymousPropertyDeclaration? getDeclaration(BoundAnonymousObjectCreationExpression node, PropertySymbol currentProperty, ref int currentDeclarationIndex) 6081if ((member is PropertySymbol { IsIndexedProperty: false } || member.Kind == SymbolKind.Field) && 7532PropertySymbol? property, 11275private bool IsPropertyOutputMoreStrictThanInput(PropertySymbol property) 11296var property = left switch 11349var annotations = memberSymbol switch { PropertySymbol prop => prop.GetFlowAnalysisAnnotations(), FieldSymbol field => GetFieldAnnotations(field), _ => FlowAnalysisAnnotations.None }; 12108private ReinferenceResult<PropertySymbol> ReInferAndVisitExtensionPropertyAccess(BoundNode node, PropertySymbol property, BoundExpression receiver) 12129var property = node.PropertySymbol; 12135ReinferenceResult<PropertySymbol> reinferenceResult = ReInferAndVisitExtensionPropertyAccess(node, property, node.ReceiverOpt); 12175var indexer = node.Indexer; 12179indexer = (PropertySymbol)AsMemberOfType(receiverType, indexer); 12251PropertySymbol? unionValue = null; 12257if (member is PropertySymbol { Name: WellKnownMemberNames.HasValuePropertyName } property && 12315var getMethod = ((PropertySymbol)member.OriginalDefinition).GetMethod;
FlowAnalysis\NullableWalker_Patterns.cs (6)
412var reinferredPropertyMap = PooledDictionary<BoundDagPropertyEvaluation, PropertySymbol>.GetInstance(); 477var property = getReInferredProperty(inputType, e); 777var property = getReInferredProperty(inputType, e); 825PropertySymbol getReInferredProperty(TypeSymbol inputType, BoundDagPropertyEvaluation e) 827if (reinferredPropertyMap.TryGetValue(e, out PropertySymbol property)) 834: (PropertySymbol)AsMemberOfType(inputType, e.Property);
Generated\BoundNodes.xml.Generated.cs (54)
325public BoundPropertyEqualsValue(SyntaxNode syntax, PropertySymbol property, ImmutableArray<LocalSymbol> locals, BoundExpression value, bool hasErrors = false) 336public PropertySymbol Property { get; } 341public BoundPropertyEqualsValue Update(PropertySymbol property, ImmutableArray<LocalSymbol> locals, BoundExpression value) 2180public BoundAwaitableInfo(SyntaxNode syntax, BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult, BoundCall? runtimeAsyncAwaitCall, BoundAwaitableValuePlaceholder? runtimeAsyncAwaitCallPlaceholder, bool hasErrors = false) 2199public PropertySymbol? IsCompleted { get; } 2207public BoundAwaitableInfo Update(BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult, BoundCall? runtimeAsyncAwaitCall, BoundAwaitableValuePlaceholder? runtimeAsyncAwaitCallPlaceholder) 5533public BoundDagPropertyEvaluation(SyntaxNode syntax, PropertySymbol property, bool isLengthOrCount, BoundDagTemp input, bool hasErrors = false) 5544public PropertySymbol Property { get; } 5550public BoundDagPropertyEvaluation Update(PropertySymbol property, bool isLengthOrCount, BoundDagTemp input) 5564public BoundDagIndexEvaluation(SyntaxNode syntax, PropertySymbol property, int index, BoundDagTemp input, bool hasErrors = false) 5575public PropertySymbol Property { get; } 5581public BoundDagIndexEvaluation Update(PropertySymbol property, int index, BoundDagTemp input) 6205public BoundPropertyGroup(SyntaxNode syntax, ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 6214public ImmutableArray<PropertySymbol> Properties { get; } 6219public BoundPropertyGroup Update(ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind) 7149public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type, bool hasErrors) 7159public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type) 7170public PropertySymbol Property { get; } 7175public BoundAnonymousPropertyDeclaration Update(PropertySymbol property, TypeSymbol type) 7473public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7490public PropertySymbol PropertySymbol { get; } 7497public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type) 7547public BoundIndexerAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol indexer, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, AccessorKind accessorKind, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ImmutableArray<PropertySymbol> originalIndexersOpt, TypeSymbol type, bool hasErrors = false) 7571public PropertySymbol Indexer { get; } 7579public ImmutableArray<PropertySymbol> OriginalIndexersOpt { get; } 7584public BoundIndexerAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol indexer, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, AccessorKind accessorKind, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ImmutableArray<PropertySymbol> originalIndexersOpt, TypeSymbol type) 7688public BoundDynamicIndexerAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type, bool hasErrors = false) 7709public ImmutableArray<PropertySymbol> ApplicableIndexers { get; } 7714public BoundDynamicIndexerAccess Update(BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type) 11117PropertySymbol property = this.VisitPropertySymbol(node.Property); 11458PropertySymbol? isCompleted = this.VisitPropertySymbol(node.IsCompleted); 12033PropertySymbol property = this.VisitPropertySymbol(node.Property); 12039PropertySymbol property = this.VisitPropertySymbol(node.Property); 12163ImmutableArray<PropertySymbol> properties = this.VisitSymbols<PropertySymbol>(node.Properties); 12332PropertySymbol property = this.VisitPropertySymbol(node.Property); 12393PropertySymbol propertySymbol = this.VisitPropertySymbol(node.PropertySymbol); 12407PropertySymbol indexer = this.VisitPropertySymbol(node.Indexer); 12408ImmutableArray<PropertySymbol> originalIndexersOpt = this.VisitSymbols<PropertySymbol>(node.OriginalIndexersOpt); 12434ImmutableArray<PropertySymbol> applicableIndexers = this.VisitSymbols<PropertySymbol>(node.ApplicableIndexers); 12729PropertySymbol property = GetUpdatedSymbol(node, node.Property); 13438PropertySymbol? isCompleted = GetUpdatedSymbol(node, node.IsCompleted); 14182PropertySymbol property = GetUpdatedSymbol(node, node.Property); 14189PropertySymbol property = GetUpdatedSymbol(node, node.Property); 14405ImmutableArray<PropertySymbol> properties = GetUpdatedArray(node, node.Properties); 14782PropertySymbol property = GetUpdatedSymbol(node, node.Property); 14942PropertySymbol propertySymbol = GetUpdatedSymbol(node, node.PropertySymbol); 14978PropertySymbol indexer = GetUpdatedSymbol(node, node.Indexer); 14979ImmutableArray<PropertySymbol> originalIndexersOpt = GetUpdatedArray(node, node.OriginalIndexersOpt); 15016ImmutableArray<PropertySymbol> applicableIndexers = GetUpdatedArray(node, node.ApplicableIndexers);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (10)
79internal readonly PropertySymbol Task; 96PropertySymbol task, 187PropertySymbol taskProperty = null; 221TryGetBuilderMember<PropertySymbol>( 268PropertySymbol taskProperty = null; 304TryGetBuilderMember<PropertySymbol>( 377PropertySymbol taskProperty, 498private static PropertySymbol GetCustomTaskProperty( 511var property = (PropertySymbol)member;
Lowering\BoundTreeToDifferentEnclosingContextRewriter.cs (5)
132var isCompleted = VisitPropertySymbol(node.IsCompleted); 191public override PropertySymbol? VisitPropertySymbol(PropertySymbol? property) 216return (PropertySymbol)member; 223return ((PropertySymbol)property.OriginalDefinition)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
944return _bound.MethodInfo(((PropertySymbol)symbol).GetOwnOrInheritedSetMethod(), _bound.WellKnownType(WellKnownType.System_Reflection_MethodInfo)); 971return _bound.MethodInfo(((PropertySymbol)symbol).GetOwnOrInheritedGetMethod(), _bound.WellKnownType(WellKnownType.System_Reflection_MethodInfo));
Lowering\DiagnosticsPass_ExpressionTrees.cs (5)
308PropertySymbol propertyAccess, 469if (node.MemberSymbol is PropertySymbol property) 567var indexer = node.Indexer; 577private void CheckRefReturningPropertyAccess(BoundNode node, PropertySymbol property) 587var property = node.PropertySymbol;
Lowering\ExtensionMethodBodyRewriter.cs (2)
185public override PropertySymbol? VisitPropertySymbol(PropertySymbol? symbol)
Lowering\ExtensionMethodReferenceRewriter.cs (2)
269public override PropertySymbol? VisitPropertySymbol(PropertySymbol? symbol)
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
159{ AssociatedSymbol: PropertySymbol { IsDirectlyExcludedFromCodeCoverage: true } } => true,
Lowering\IteratorRewriter\IteratorRewriter.cs (2)
156PropertySymbol symbol = (PropertySymbol)EnsureSpecialMember(member, bag);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
152PropertySymbol property = p.Property;
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (4)
194PropertySymbol property = propertyAccess.PropertySymbol; 215PropertySymbol indexer = indexerAccess.Indexer; 280private bool IsExtensionPropertyWithByValPossiblyStructReceiverWhichHasHomeAndCanChangeValueBetweenReads(BoundExpression rewrittenReceiver, PropertySymbol property) 294PropertySymbol property,
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
117private void EmbedIfNeedTo(BoundExpression receiver, ImmutableArray<PropertySymbol> properties, SyntaxNode syntaxNode) 128foreach (var p in properties) 680Debug.Assert(!forceReceiverCapturing || methodOrIndexer is PropertySymbol);
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
445PropertySymbol indexer = indexerAccess.Indexer; 473PropertySymbol indexer,
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
268PropertySymbol? invocationListProperty;
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (2)
79PropertySymbol indexer = node.Indexer; 105PropertySymbol indexer,
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
715var propertySymbol = (PropertySymbol)memberSymbol;
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (3)
29PropertySymbol propertySymbol, 68private BoundExpression MakePropertyGetAccess(SyntaxNode syntax, BoundExpression? rewrittenReceiver, PropertySymbol property, BoundPropertyAccess? oldNodeOpt) 76PropertySymbol property,
Lowering\MethodToClassRewriter.cs (2)
91var rewrittenPropertySymbol = VisitPropertySymbol(node.PropertySymbol); 370member = VisitPropertySymbol((PropertySymbol)member);
Lowering\StateMachineRewriter\StateMachineRewriter.cs (2)
390var currentManagedThreadIdProperty = (PropertySymbol)F.WellKnownMember(WellKnownMember.System_Environment__CurrentManagedThreadId, isOptional: true);
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.cs (2)
28PropertySymbol associatedProperty, 115PropertySymbol associatedProperty,
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (3)
91private PropertySymbol ImplementedProperty 95return (PropertySymbol)_getter.ExplicitInterfaceImplementations[0].AssociatedSymbol; 99public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations
Lowering\SyntheticBoundNodeFactory.cs (7)
271var propertySym = (PropertySymbol)WellKnownMember(member); 273receiverOpt.Type.GetMembers(propertySym.Name).OfType<PropertySymbol>().Single() == propertySym); 278public BoundExpression Property(BoundExpression? receiverOpt, PropertySymbol property) 293public BoundExpression Indexer(BoundExpression? receiverOpt, PropertySymbol property, BoundExpression arg0) 416public PropertySymbol SpecialProperty(SpecialMember sm) 418return (PropertySymbol)SpecialMember(sm);
Operations\CSharpOperationFactory.cs (5)
633PropertySymbol property = boundIndexerAccess.Indexer; 892var property = (PropertySymbol)memberSymbol; 1969((PropertySymbol)enumeratorInfoOpt.CurrentPropertyGetter.AssociatedSymbol).GetPublicSymbol(), 2971case PropertySymbol property:
Operations\CSharpOperationFactory_Methods.cs (4)
201var property = (PropertySymbol?)boundObjectInitializerMember.MemberSymbol; 435PropertySymbol property = AnonymousTypeManager.GetAnonymousTypeProperty(type.GetSymbol<NamedTypeSymbol>(), i); 474static BoundAnonymousPropertyDeclaration? getDeclaration(ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, PropertySymbol currentProperty, ref int currentDeclarationIndex)
Symbols\AnonymousTypes\AnonymousTypeManager.cs (1)
55internal static PropertySymbol GetAnonymousTypeProperty(NamedTypeSymbol type, int index)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ConstructorSymbol.cs (1)
32PropertySymbol property = properties[index];
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (2)
22private readonly PropertySymbol _property; 24public AnonymousTypeFieldSymbol(PropertySymbol property)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (2)
163public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 165get { return ImmutableArray<PropertySymbol>.Empty; }
Symbols\Attributes\AttributeData.cs (3)
558var property = (PropertySymbol)members[0]; 653if (member is PropertySymbol { Type: { SpecialType: SpecialType.System_String } })
Symbols\Compilation_WellKnownMembers.cs (8)
251internal static Symbol? GetRuntimeMember(NamedTypeSymbol declaringType, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 257internal static Symbol? GetRuntimeMember(ImmutableArray<Symbol> members, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 336PropertySymbol property = (PropertySymbol)member; 1103internal class SpecialMembersSignatureComparer : SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> 1132protected override TypeSymbol GetPropertyType(PropertySymbol property) 1178protected override ImmutableArray<ParameterSymbol> GetParameters(PropertySymbol property) 1222protected override bool IsByRefProperty(PropertySymbol property)
Symbols\ErrorPropertySymbol.cs (2)
94public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations { get { return ImmutableArray<PropertySymbol>.Empty; } }
Symbols\MemberSymbolExtensions.cs (26)
42return ((PropertySymbol)member).Parameters; 60return ((PropertySymbol)member).ParameterTypesWithAnnotations; 90return IsExtensionBlockMember((PropertySymbol)member); 101internal static bool IsExtensionBlockMember(this PropertySymbol member) 142if (member is PropertySymbol property) 173if (member is PropertySymbol) 229if (member is PropertySymbol property) 294else if (member is PropertySymbol property) 299var result = (PropertySymbol?)SourceNamedTypeSymbol.ReduceExtensionMember(compilation, property, receiverType, wasExtensionFullyInferred: out bool wasFullyInferred); 330return ((PropertySymbol)member).ParameterRefKinds; 345return ((PropertySymbol)member).ParameterCount; 380var propertySymbol = (PropertySymbol)symbol; 429return symbol.Kind == SymbolKind.Property && ((PropertySymbol)symbol).IsIndexer; 434return symbol.Kind == SymbolKind.Property && ((PropertySymbol)symbol).IsIndexedProperty; 480return ((PropertySymbol)m).CustomModifierCount(); 495public static int CustomModifierCount(this PropertySymbol property) 524return ((PropertySymbol)s).AsMember(newOwner); 786return ((PropertySymbol)member).IsExplicitInterfaceImplementation; 864return ((PropertySymbol)member).Type.ContainsTupleNames(); 880return ((PropertySymbol)member).ExplicitInterfaceImplementations.Cast<PropertySymbol, Symbol>(); 895return ((PropertySymbol)member).OverriddenProperty; 912var property = (PropertySymbol)member;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
1605internal override IEnumerable<PropertySymbol> GetPropertiesToEmit() 1607return GetMembers<PropertySymbol>(this.GetMembers(), SymbolKind.Property);
Symbols\Metadata\PE\PEPropertySymbol.cs (7)
506PropertySymbol curr = this; 538PropertySymbol next = curr.OverriddenProperty; 882public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 889return ImmutableArray<PropertySymbol>.Empty; 895var builder = ArrayBuilder<PropertySymbol>.GetInstance(); 897foreach (var prop in propertiesWithImplementedGetters) 905foreach (var prop in propertiesWithImplementedSetters)
Symbols\MethodSymbolExtensions.cs (1)
234method.AssociatedSymbol is PropertySymbol { HasUnscopedRefAttribute: true };
Symbols\NamedTypeSymbol.cs (7)
315public ImmutableArray<PropertySymbol> Indexers 323return ImmutableArray<PropertySymbol>.Empty; 328ArrayBuilder<PropertySymbol> indexers = ArrayBuilder<PropertySymbol>.GetInstance(); 333Debug.Assert(((PropertySymbol)candidate).IsIndexer); 334indexers.Add((PropertySymbol)candidate); 839if (member is PropertySymbol { ParameterCount: > 0 } prop)
Symbols\NativeIntegerTypeSymbol.cs (4)
127case PropertySymbol underlyingProperty: 504PropertySymbol underlyingProperty, 527public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations => ImmutableArray<PropertySymbol>.Empty;
Symbols\OverriddenOrHiddenMembersHelpers.cs (13)
29internal static OverriddenOrHiddenMembersResult MakeOverriddenOrHiddenMembers(this PropertySymbol member) 102return MakePropertyAccessorOverriddenOrHiddenMembers(accessor, (PropertySymbol)associatedPropertyOrEvent); 154PEPropertySymbol { GetMethod: PEMethodSymbol { ExplicitlyOverriddenClassMethod: { AssociatedSymbol: PropertySymbol overriddenProperty } } } => overriddenProperty, 155RetargetingPropertySymbol { GetMethod: RetargetingMethodSymbol { ExplicitlyOverriddenClassMethod: { AssociatedSymbol: PropertySymbol overriddenProperty } } } => overriddenProperty, 241private static OverriddenOrHiddenMembersResult MakePropertyAccessorOverriddenOrHiddenMembers(MethodSymbol accessor, PropertySymbol associatedProperty) 259PropertySymbol propertyHiddenByProperty = (PropertySymbol)hiddenByProperty; 271PropertySymbol propertyOverriddenByProperty = (PropertySymbol)hiddenOrOverriddenByProperty.OverriddenMembers[0]; 897PropertySymbol property = (PropertySymbol)member; 917PropertySymbol property = (PropertySymbol)member;
Symbols\PropertyOrEventSymbolExtensions.cs (2)
22internal static ISet<PropertySymbol> GetPropertiesForExplicitlyImplementedAccessor(MethodSymbol accessor) 24return GetSymbolsForExplicitlyImplementedAccessor<PropertySymbol>(accessor);
Symbols\PropertySymbol.cs (13)
41public new virtual PropertySymbol OriginalDefinition 225public PropertySymbol OverriddenProperty 233return (PropertySymbol)OverriddenOrHiddenMembers.GetOverriddenMember(); 236return (PropertySymbol)OverriddenOrHiddenMembersResult.GetOverriddenMember(this, OriginalDefinition.OverriddenProperty); 262internal PropertySymbol GetLeastOverriddenProperty(NamedTypeSymbol accessingTypeOpt) 265PropertySymbol p = this; 288PropertySymbol overridden = p.OverriddenProperty; 321public abstract ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations { get; } 324internal virtual PropertySymbol? PartialImplementationPart => null; 325internal virtual PropertySymbol? PartialDefinitionPart => null; 378internal PropertySymbol AsMember(NamedTypeSymbol newOwner) 454PropertySymbol other = symbol as PropertySymbol;
Symbols\PropertySymbolExtensions.cs (5)
13public static bool IsParams(this PropertySymbol property) 22public static MethodSymbol? GetOwnOrInheritedGetMethod(this PropertySymbol? property) 42public static MethodSymbol? GetOwnOrInheritedSetMethod(this PropertySymbol? property) 58public static bool CanCallMethodsDirectly(this PropertySymbol property) 69public static bool HasRefOrOutParameter(this PropertySymbol property)
Symbols\PublicModel\PropertySymbol.cs (2)
15private readonly Symbols.PropertySymbol _underlying; 18public PropertySymbol(Symbols.PropertySymbol underlying)
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (2)
211internal override IEnumerable<PropertySymbol> GetPropertiesToEmit() 213foreach (PropertySymbol p in _underlyingType.GetPropertiesToEmit())
Symbols\Retargeting\RetargetingPropertySymbol.cs (7)
25private ImmutableArray<PropertySymbol> _lazyExplicitInterfaceImplementations; 38public RetargetingPropertySymbol(RetargetingModuleSymbol retargetingModule, PropertySymbol underlyingProperty) 151public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 160default(ImmutableArray<PropertySymbol>)); 166private ImmutableArray<PropertySymbol> RetargetExplicitInterfaceImplementations() 178var builder = ArrayBuilder<PropertySymbol>.GetInstance(); 182var retargeted = this.RetargetingTranslator.Retarget(impls[i], MemberSignatureComparer.RetargetedExplicitImplementationComparer);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (14)
89return new RetargetingPropertySymbol(this, (PropertySymbol)symbol); 924public PropertySymbol Retarget(PropertySymbol property) 929return (PropertySymbol)this.SymbolMap.GetOrAdd(property, _retargetingModule._createRetargetingProperty); 932public PropertySymbol Retarget(PropertySymbol property, IEqualityComparer<PropertySymbol> retargetedPropertyComparer) 1074private PropertySymbol FindPropertyInRetargetedType(PropertySymbol property, NamedTypeSymbol retargetedType, IEqualityComparer<PropertySymbol> retargetedPropertyComparer) 1093ImmutableArray<PropertySymbol>.Empty); 1099var retargetedProperty = (PropertySymbol)retargetedMember; 1364public override Symbol VisitProperty(PropertySymbol symbol, RetargetOptions argument)
Symbols\SignatureOnlyPropertySymbol.cs (3)
28private readonly ImmutableArray<PropertySymbol> _explicitInterfaceImplementations; 38ImmutableArray<PropertySymbol> explicitInterfaceImplementations) 60public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations { get { return _explicitInterfaceImplementations; } }
Symbols\Source\ExplicitInterfaceHelpers.cs (5)
159internal static PropertySymbol FindExplicitlyImplementedProperty( 160this PropertySymbol implementingProperty, 166return (PropertySymbol)FindExplicitlyImplementedMember(implementingProperty, isOperator: false, explicitInterfaceType, interfacePropertyName, explicitInterfaceSpecifierSyntax, diagnostics); 353var propertySymbol = (PropertySymbol)implementedMember;
Symbols\Source\ExtensionGroupingInfo.cs (1)
774foreach (PropertySymbol property in type.GetPropertiesToEmit())
Symbols\Source\ModifierUtils.cs (2)
555case PropertySymbol { SetMethod: { } method } when !method.IsAsRestrictive(symbol.ContainingType, ref useSiteInfo): 560case PropertySymbol { SetMethod: null }:
Symbols\Source\SourceMemberContainerSymbol.cs (26)
1843else if (member is FieldSymbol { AssociatedSymbol: SourcePropertySymbolBase { PartialDefinitionPart: PropertySymbol definition } implementation } && 2410var indexersBySignature = new Dictionary<PropertySymbol, PropertySymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2422PropertySymbol indexer = (PropertySymbol)symbol; 2472PropertySymbol indexer, 2475Dictionary<PropertySymbol, PropertySymbol> indexersBySignature, 2509if (indexersBySignature.TryGetValue(indexer, out var prevIndexerBySignature)) 2720var propertySymbol = (PropertySymbol)symbol; 4523PropertySymbol propertySymbol, 4608private static Location GetAccessorOrPropertyLocation(PropertySymbol propertySymbol, bool getNotSet) 4627private static bool ParametersMatchPropertyAccessor(PropertySymbol propertySymbol, bool getNotSet, ImmutableArray<ParameterSymbol> methodParams) 4830if (!((PropertySymbol)member).IsIndexer) 5098PropertySymbol? equalityContract = isRecordClass ? addEqualityContract() : null; 5124Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol { GetMethod.IsEffectivelyReadOnly: false })); 5135Debug.Assert(positionalMembers.All(p => p is PropertySymbol or FieldSymbol)); 5387ImmutableArray<PropertySymbol>.Empty); 5411else if (existingMember is PropertySymbol { IsStatic: false, GetMethod: { } } prop 5469MethodSymbol addGetHashCode(PropertySymbol? equalityContract) 5503PropertySymbol addEqualityContract() 5513ImmutableArray<PropertySymbol>.Empty); 5515PropertySymbol equalityContract; 5525equalityContract = (PropertySymbol)existingEqualityContractProperty; 5562MethodSymbol addThisEquals(PropertySymbol? equalityContract)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (12)
586var property = (PropertySymbol)member; 807: ((PropertySymbol)overridingMember).ParameterTypesWithAnnotations; 826PropertySymbol associatedProperty = (PropertySymbol)associatedPropertyOrEvent; 827PropertySymbol overriddenProperty = associatedProperty.OverriddenProperty; 931else if (overriddenMember is PropertySymbol { IsRequired: true } && overridingMember is PropertySymbol { IsRequired: false }) 966checkOverriddenProperty((PropertySymbol)overridingMember, (PropertySymbol)overriddenMember, diagnostics, ref suppressAccessors); 1072void checkOverriddenProperty(PropertySymbol overridingProperty, PropertySymbol overriddenProperty, BindingDiagnosticBag diagnostics, ref bool suppressAccessors)
Symbols\Source\SourceNamedTypeSymbol.cs (2)
1959if (Indexers.FirstOrDefault() is PropertySymbol indexerSymbol) 1990foreach (PropertySymbol indexer in Indexers)
Symbols\Source\SourcePropertyAccessorSymbol.cs (3)
318PropertySymbol associatedProperty = _property; 652PropertySymbol? explicitlyImplementedPropertyOpt = IsExplicitInterfaceImplementation ? _property.ExplicitInterfaceImplementations.FirstOrDefault() : null; 729PropertySymbol? explicitlyImplementedPropertyOpt = _property.ExplicitInterfaceImplementations.FirstOrDefault();
Symbols\Source\SourcePropertySymbol.cs (2)
857internal sealed override PropertySymbol? PartialDefinitionPart => SourcePartialDefinitionPart; 858internal sealed override PropertySymbol? PartialImplementationPart => SourcePartialImplementationPart;
Symbols\Source\SourcePropertySymbolBase.cs (10)
57private ImmutableArray<PropertySymbol> _lazyExplicitInterfaceImplementations; 122_lazyExplicitInterfaceImplementations = ImmutableArray<PropertySymbol>.Empty; 205PropertySymbol? explicitlyImplementedProperty = null; 229PropertySymbol? overriddenOrImplementedProperty; 280ImmutableArray<PropertySymbol>.Empty : 682public sealed override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 920var overriddenProperty = (PropertySymbol)this.GetLeastOverriddenMember(this.ContainingType); 1016PropertySymbol? explicitlyImplementedProperty = ExplicitInterfaceImplementations.FirstOrDefault(); 1219private void CheckExplicitImplementationAccessor(MethodSymbol thisAccessor, MethodSymbol otherAccessor, PropertySymbol explicitlyImplementedProperty, BindingDiagnosticBag diagnostics)
Symbols\SubstitutedNamedTypeSymbol.cs (1)
471internal override IEnumerable<PropertySymbol> GetPropertiesToEmit()
Symbols\SubstitutedParameterSymbol.cs (1)
24internal SubstitutedParameterSymbol(PropertySymbol containingSymbol, TypeMap map, ParameterSymbol originalParameter) :
Symbols\SubstitutedPropertySymbol.cs (5)
19internal SubstitutedPropertySymbol(SubstitutedNamedTypeSymbol containingType, PropertySymbol originalDefinition) 55public override PropertySymbol OriginalDefinition 110private ImmutableArray<PropertySymbol> _lazyExplicitInterfaceImplementations; 114public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 123default(ImmutableArray<PropertySymbol>));
Symbols\Symbol.cs (5)
665var property = (PropertySymbol)this; 689if (!((PropertySymbol)method.AssociatedSymbol).CanCallMethodsDirectly()) 744return ((PropertySymbol)method.AssociatedSymbol).CanCallMethodsDirectly(); 1701builder.AddValue(((PropertySymbol)this).TypeWithAnnotations);
Symbols\SymbolExtensions.cs (13)
323return ((PropertySymbol)symbol).MustCallMethodsDirectly; 438internal static FlowAnalysisAnnotations GetFlowAnalysisAnnotations(this PropertySymbol property) 468PropertySymbol property => property.GetFlowAnalysisAnnotations(), 493PropertySymbol property = (PropertySymbol)symbol; 536SymbolKind.Property => ((PropertySymbol)symbol).RequiresInstanceReceiver, 563internal static IPropertySymbol? GetPublicSymbol(this PropertySymbol? symbol) 697internal static ImmutableArray<IPropertySymbol> GetPublicSymbols(this ImmutableArray<PropertySymbol> symbols) 802internal static PropertySymbol? GetSymbol(this IPropertySymbol? symbol) 804return symbol.GetSymbol<PropertySymbol>(); 813internal static bool IsRequired(this Symbol symbol) => symbol is FieldSymbol { IsRequired: true } or PropertySymbol { IsRequired: true }; 820Debug.Assert(symbol is MethodSymbol or PropertySymbol); 821return symbol is MethodSymbol method ? method.OverloadResolutionPriority : ((PropertySymbol)symbol).OverloadResolutionPriority;
Symbols\SymbolVisitor.cs (1)
105public virtual void VisitProperty(PropertySymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
105public virtual TResult VisitProperty(PropertySymbol symbol)
Symbols\SymbolVisitor`2.cs (2)
209/// Called when visiting a <see cref="PropertySymbol" />; Override this with specific 215public virtual TResult VisitProperty(PropertySymbol symbol, TArgument argument)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (3)
52(PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_IEnumerator__Current), 72((PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IEnumerator_T__Current)).AsMember(iEnumeratorT), 121static void addProperty(ArrayBuilder<Symbol> builder, PropertySymbol property)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (3)
13private readonly PropertySymbol _interfaceProperty; 17PropertySymbol interfaceProperty, 47public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations => ImmutableArray.Create(_interfaceProperty);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (16)
327(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_ICollection__Count)!, 332(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_ICollection__IsSynchronized)!, 337(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_ICollection__SyncRoot)!, 347(PropertySymbol)((MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__get_Item)!).AssociatedSymbol, 353(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__IsFixedSize)!, 358(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__IsReadOnly)!, 405((PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IReadOnlyCollection_T__Count)!).AsMember(iReadOnlyCollectionT), 410((PropertySymbol)((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IReadOnlyList_T__get_Item)!).AssociatedSymbol).AsMember(iReadOnlyListT), 416((PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_ICollection_T__Count)!).AsMember(iCollectionT), 421((PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_ICollection_T__IsReadOnly)!).AsMember(iCollectionT), 451((PropertySymbol)((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IList_T__get_Item)!).AssociatedSymbol).AsMember(iListT), 525var listMember = (PropertySymbol)containingType.GetFieldTypeMember(WellKnownMember.System_Collections_Generic_List_T__Count); 710var listMember = (PropertySymbol)((MethodSymbol)containingType.GetFieldTypeMember(WellKnownMember.System_Collections_Generic_List_T__get_Item)).AssociatedSymbol; 770static void addProperty(ArrayBuilder<Symbol> builder, PropertySymbol property)
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (5)
26Debug.Assert(positionalMembers.All(p => p is PropertySymbol { GetMethod: not null } or FieldSymbol)); 68PropertySymbol property => property.Type, 83case PropertySymbol property: 106var property = (PropertySymbol)m;
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (2)
103internal static void VerifyOverridesEqualityContractFromBase(PropertySymbol overriding, BindingDiagnosticBag diagnostics) 126var overridden = overriding.OverriddenProperty;
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (2)
19private readonly PropertySymbol? _equalityContract; 21public SynthesizedRecordEquals(SourceMemberContainerTypeSymbol containingType, PropertySymbol? equalityContract, int memberOffset)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (2)
18private readonly PropertySymbol? _equalityContract; 20public SynthesizedRecordGetHashCode(SourceMemberContainerTypeSymbol containingType, PropertySymbol? equalityContract, int memberOffset)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (6)
202SymbolKind.Property => F.Property(F.This(), (PropertySymbol)member), 259var property = (PropertySymbol)m; 319var property = (PropertySymbol)member; 340private static bool IsPrintableProperty(PropertySymbol property)
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
112public override TypeWithAnnotations TypeWithAnnotations => ((PropertySymbol)((SourcePropertyAccessorSymbol)ContainingSymbol).AssociatedSymbol).TypeWithAnnotations;
Symbols\Synthesized\SynthesizedEmbeddedAttributePropertySymbol.cs (1)
35public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations => [];
Symbols\Synthesized\SynthesizedEmbeddedMemorySafetyRulesAttributeSymbol.cs (2)
30private readonly ImmutableArray<PropertySymbol> _properties; 101foreach (var property in _properties)
Symbols\Synthesized\SynthesizedImplementationMethod.cs (2)
20private readonly PropertySymbol _associatedProperty; 33PropertySymbol associatedProperty = null)
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (2)
25private readonly PropertySymbol _property; 29public SynthesizedSealedPropertyAccessor(PropertySymbol property, MethodSymbol overriddenAccessor)
Symbols\TypeSymbol.cs (12)
1415PropertySymbol interfaceProperty = (PropertySymbol)interfaceMember; 1574correspondingImplementingAccessor = ((PropertySymbol)implementingPropertyOrEvent).GetOwnOrInheritedGetMethod(); 1577correspondingImplementingAccessor = ((PropertySymbol)implementingPropertyOrEvent).GetOwnOrInheritedSetMethod(); 1939var implementingProperty = (PropertySymbol)implementingMember; 1940var implementedProperty = (PropertySymbol)interfaceMember; 2039var property = (PropertySymbol)interfaceMember; 2058hasRefReturnMismatch = ((PropertySymbol)closestMismatch).RefKind != interfaceMemberRefKind; 2440overriddenMember = ((PropertySymbol)member).OverriddenProperty;
Symbols\VarianceSafety.cs (2)
56CheckPropertyVarianceSafety((PropertySymbol)member, diagnostics); 188private static void CheckPropertyVarianceSafety(PropertySymbol property, BindingDiagnosticBag diagnostics)
Symbols\Wrapped\WrappedPropertySymbol.cs (3)
28protected readonly PropertySymbol _underlyingProperty; 30public WrappedPropertySymbol(PropertySymbol underlyingProperty) 36public PropertySymbol UnderlyingProperty