9 types derived from PropertySymbol
Microsoft.CodeAnalysis.CSharp (9)
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
17internal class SynthesizedStateMachineProperty : PropertySymbol, ISynthesizedMethodBodyImplementationSymbol
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
19internal sealed class AnonymousTypePropertySymbol : PropertySymbol
Symbols\ErrorPropertySymbol.cs (1)
26internal 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)
23internal abstract class SourcePropertySymbolBase : PropertySymbol, IAttributeTargetSymbol
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
11internal sealed class SynthesizedReadOnlyListProperty : PropertySymbol
Symbols\Synthesized\SynthesizedEmbeddedAttributePropertySymbol.cs (1)
13internal sealed class SynthesizedEmbeddedAttributePropertySymbol : PropertySymbol
Symbols\Wrapped\WrappedPropertySymbol.cs (1)
23internal abstract class WrappedPropertySymbol : PropertySymbol
700 references to PropertySymbol
Microsoft.CodeAnalysis.CSharp (700)
Binder\Binder_AnonymousTypes.cs (1)
127declarators.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, 281out PropertySymbol? isCompleted, 638private bool GetIsCompletedProperty(TypeSymbol awaiterType, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, [NotNullWhen(true)] out PropertySymbol? isCompletedProperty)
Binder\Binder_Crefs.cs (1)
1022explicitInterfaceImplementations: ImmutableArray<PropertySymbol>.Empty);
Binder\Binder_Expressions.cs (66)
1570ContainingMember() is MethodSymbol { MethodKind: MethodKind.PropertyGet or MethodKind.PropertySet, AssociatedSymbol: PropertySymbol { IsIndexer: false } }) 2195return BindPropertyAccess(node, receiver, (PropertySymbol)symbol, diagnostics, resultKind, hasErrors: isError); 6205PropertySymbol propertySymbol, 7760leftType = ((PropertySymbol)leftSymbol).Type; 8293case PropertySymbol propertySymbol: 8587resultType = ((PropertySymbol)symbolOpt).Type; 8731result = BindPropertyAccess(node, left, (PropertySymbol)symbol, diagnostics, lookupResult.Kind, hasErrors: wasError); 8892OverloadResolutionResult<PropertySymbol>? propertyResult = arity != 0 || acceptOnlyMethods ? null : resolveProperties(left, lookupResult, binder, ref actualReceiverArguments, ref useSiteInfo); 8965static OverloadResolutionResult<PropertySymbol>? resolveProperties( 8972ArrayBuilder<PropertySymbol>? properties = null; 8975if (member is PropertySymbol property) 8977properties ??= ArrayBuilder<PropertySymbol>.GetInstance(); 8994OverloadResolutionResult<PropertySymbol> propertyResult, 9014PropertySymbol representativeProperty = propertyResult.PickRepresentativeMember(); 9118private OverloadResolutionResult<PropertySymbol> ResolveExtensionProperties( 9120ArrayBuilder<PropertySymbol> properties, 9132var overloadResolutionResult = OverloadResolutionResult<PropertySymbol>.GetInstance(); 9254if (!lookupResult.IsMultiViable || lookupResult.Symbols.All(s => s is not PropertySymbol { IsIndexer: true })) 9261var properties = ArrayBuilder<PropertySymbol>.GetInstance(); 9264if (member is PropertySymbol { IsIndexer: true } property) 9400bool foundApplicable = tryLookupExtensionLengthOrCount(syntax, receiver, binder, scope, ref actualExtensionLengthOrCountArguments, out var lengthOrCountProperty, ref useSiteInfo, diagnostics); 9422[NotNullWhen(true)] out PropertySymbol? lengthOrCountProperty, 9436ArrayBuilder<PropertySymbol>? lengthCandidates = null; 9437ArrayBuilder<PropertySymbol>? countCandidates = null; 9440if (candidate is PropertySymbol property && 9447lengthCandidates ??= ArrayBuilder<PropertySymbol>.GetInstance(); 9452countCandidates ??= ArrayBuilder<PropertySymbol>.GetInstance(); 9474static bool tryResolveLengthOrCount(BoundExpression receiver, ArrayBuilder<PropertySymbol>? properties, Binder binder, 9475ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ref AnalyzedArguments? actualArguments, out PropertySymbol? property) 9578ArrayBuilder<PropertySymbol>? filteredCandidates = null; 9721static void filterIntIndexerCandidates(ArrayBuilder<Symbol> candidates, ref ArrayBuilder<PropertySymbol>? filteredCandidates, 9726if (candidate is PropertySymbol property && 9731filteredCandidates ??= ArrayBuilder<PropertySymbol>.GetInstance(); 9759ArrayBuilder<PropertySymbol> properties, 9767OverloadResolutionResult<PropertySymbol> result = binder.ResolveExtensionProperties(receiver, properties, analyzedArguments, ref actualArguments, ref useSiteInfo); 9782MemberResolutionResult<PropertySymbol> resolutionResult = result.ValidResult; 9983PropertySymbol propertySymbol, 10278foreach (PropertySymbol property in members) 10622return BindDynamicIndexer(node, expr, arguments, ImmutableArray<PropertySymbol>.Empty, diagnostics); 10931ArrayBuilder<PropertySymbol> indexerGroup = ArrayBuilder<PropertySymbol>.GetInstance(); 10935indexerGroup.Add((PropertySymbol)symbol); 10998private static readonly Func<PropertySymbol, bool> s_isIndexedPropertyWithNonOptionalArguments = property => 11049private BoundExpression BindIndexedPropertyAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<PropertySymbol> propertyGroup, AnalyzedArguments arguments, BindingDiagnosticBag diagnostics) 11054var properties = ArrayBuilder<PropertySymbol>.GetInstance(); 11068ImmutableArray<PropertySymbol> applicableProperties, 11111ArrayBuilder<PropertySymbol> propertyGroup, 11118OverloadResolutionResult<PropertySymbol> overloadResolutionResult = OverloadResolutionResult<PropertySymbol>.GetInstance(); 11150ArrayBuilder<PropertySymbol> propertyGroup, 11152OverloadResolutionResult<PropertySymbol> overloadResolutionResult, 11160ImmutableArray<PropertySymbol> candidates = propertyGroup.ToImmutable(); 11163var candidate = candidates[0]; 11183PropertySymbol property = (candidates.Length == 1) ? candidates[0] : CreateErrorPropertySymbol(candidates); 11196MemberResolutionResult<PropertySymbol> resolutionResult = overloadResolutionResult.ValidResult; 11205private BoundIndexerAccess BindResolvedIndexerOrIndexedPropertyAccess(SyntaxNode syntax, BoundExpression receiver, AnalyzedArguments analyzedArguments, BindingDiagnosticBag diagnostics, ImmutableArray<string> argumentNames, ImmutableArray<RefKind> argumentRefKinds, MemberResolutionResult<PropertySymbol> resolutionResult) 11207PropertySymbol property = resolutionResult.Member; 11219this.CheckAndCoerceArguments<PropertySymbol>(syntax, resolutionResult, analyzedArguments, diagnostics, receiver, invokedAsExtensionMethod: false, out argsToParams); 11469private static bool HasValidLengthOrCountGetter(PropertySymbol property) 11481private static bool IsValidImplicitIndexIndexer(PropertySymbol property) 11500if (tryLookupLengthOrCount(syntax, receiverPlaceholder.Type, lookupResult, binder: this, out var lengthOrCountProperty, ref useSiteInfo, diagnostics)) 11520[NotNullWhen(true)] out PropertySymbol? lengthOrCountProperty, 11540[NotNullWhen(true)] out PropertySymbol? valid, 11556lookupResult.Symbols[0] is PropertySymbol property && 11572private ErrorPropertySymbol CreateErrorPropertySymbol(ImmutableArray<PropertySymbol> propertyGroup) 11575var candidate = propertyGroup[0];
Binder\Binder_Invocation.cs (3)
1411internal ThreeState ReceiverIsSubjectToCloning(BoundExpression? receiver, PropertySymbol property) 2175private ImmutableArray<BoundExpression> BuildArgumentsForErrorRecovery(AnalyzedArguments analyzedArguments, ImmutableArray<PropertySymbol> properties) 2178foreach (var p in properties)
Binder\Binder_Lookup.cs (3)
1657var property = ((PropertySymbol)symbol).GetLeastOverriddenProperty(this.ContainingType); 1847type = ((PropertySymbol)symbol).Type;
Binder\Binder_Patterns.cs (4)
56internal static bool IsUnionTypeHasValueProperty(NamedTypeSymbol unionType, PropertySymbol property) 420private bool IsCountableAndIndexable(SyntaxNode node, TypeSymbol inputType, out PropertySymbol? lengthProperty) 1753isLengthOrCount = IsCountableAndIndexable(node, receiverType, out PropertySymbol? lengthProperty) && 1806case PropertySymbol property:
Binder\Binder_Statements.cs (4)
1667internal static PropertySymbol GetPropertySymbol(BoundExpression expr, out BoundExpression receiver, out SyntaxNode propertySyntax) 1676PropertySymbol propertySymbol; 1805private static bool AccessingAutoPropertyFromConstructor(BoundExpression? receiver, PropertySymbol propertySymbol, Symbol fromMember, AccessorKind accessorKind) 1821private 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\Binder.cs (1)
804internal void ReportDisallowedExtensionBlockIndexer(PropertySymbol property, SyntaxNode syntax, BindingDiagnosticBag diagnostics)
Binder\Binder.ValueChecks.cs (18)
60internal static MethodInfo CreateFromPropertyGetter(PropertySymbol property) 65internal static MethodInfo CreateFromPropertySetter(PropertySymbol property) 632PropertySymbol indexer = indexerAccess.Indexer; 1996var propertySymbol = GetPropertySymbol(expr, out receiver, out propertySyntax); 2857case PropertySymbol property: 3834var indexerSymbol = indexerAccess.Indexer; 3849var indexerSymbol = indexerAccess.Indexer; 4113var indexerSymbol = indexerAccess.Indexer; 4137var indexerSymbol = indexerAccess.Indexer; 4225var propertySymbol = propertyAccess.PropertySymbol; 4483var indexerSymbol = indexerAccess.Indexer; 4498var indexerSymbol = indexerAccess.Indexer; 4925PropertySymbol { IsIndexer: true } indexer => getIndexerEscape(indexer, left, rightEscape), 4926PropertySymbol property => getPropertyEscape(property, rightEscape), 4943PropertySymbol indexer, 5000PropertySymbol property, 5212var indexerSymbol = indexerAccess.Indexer; 5231var indexerSymbol = indexerAccess.Indexer;
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1293PropertySymbol property = GetPropertySymbol(propertyDeclSyntax, outerBinder);
Binder\DecisionDagBuilder_ListPatterns.cs (1)
44var lengthProperty = Binder.GetPropertySymbol(list.LengthAccess, out _, out _);
Binder\DecisionDagBuilder.cs (10)
436Debug.Assert(unionValue.Symbol is PropertySymbol); 437var property = (PropertySymbol)unionValue.Symbol; 507var getLengthProperty = (PropertySymbol)pattern.GetLengthMethod.AssociatedSymbol; 509var getItemProperty = (PropertySymbol)pattern.GetItemMethod.AssociatedSymbol; 753if (inputInfo.UnionValue is { } unionValue && ((NamedTypeSymbol)inputInfo.DagTemp.Type).UnionHasValueProperty() is PropertySymbol hasValue) 1008if (subpattern.Member is { Symbol: PropertySymbol { Name: WellKnownMemberNames.ValuePropertyName } property, Receiver: var receiver } member) 1081case PropertySymbol property:
Binder\ForEachLoopBinder.cs (2)
1062builder.ElementTypeWithAnnotations = ((PropertySymbol)builder.CurrentPropertyGetter.AssociatedSymbol).TypeWithAnnotations; 1709MethodSymbol currentPropertyGetterCandidate = ((PropertySymbol)lookupSymbol).GetOwnOrInheritedGetMethod();
Binder\LocalBinderFactory.cs (2)
314PropertySymbol property => property.Parameters, 330case PropertySymbol property:
Binder\RefSafetyAnalysis.cs (1)
1090var 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 = ((NamedTypeSymbol)unionMatchingInputType.StrippedType()).UnionValuePropertyNoUseSiteDiagnostics();
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)
1035currentProperty: ((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)
321internal PropertySymbol AdaptedPropertySymbol => this; 323internal new PropertySymbol GetCciAdapter()
Emitter\NoPia\EmbeddedProperty.cs (2)
13using PropertySymbolAdapter = Microsoft.CodeAnalysis.CSharp.Symbols.PropertySymbol; 20public EmbeddedProperty(PropertySymbolAdapter underlyingProperty, EmbeddedMethod getter, EmbeddedMethod setter) :
Emitter\NoPia\EmbeddedType.cs (3)
20using PropertySymbolAdapter = Microsoft.CodeAnalysis.CSharp.Symbols.PropertySymbol; 114protected override IEnumerable<PropertySymbolAdapter> GetPropertiesToEmit() 307TypeManager.EmbedProperty(this, ((PropertySymbol)s).GetCciAdapter(), syntaxNodeOpt, diagnostics);
Emitter\NoPia\EmbeddedTypesManager.cs (4)
24using PropertySymbolAdapter = Microsoft.CodeAnalysis.CSharp.Symbols.PropertySymbol; 35NamedTypeSymbolAdapter, FieldSymbolAdapter, MethodSymbolAdapter, EventSymbolAdapter, PropertySymbolAdapter, ParameterSymbolAdapter, TypeParameterSymbolAdapter, 567EmbedProperty(type, ((PropertySymbol)propertyOrEvent).GetCciAdapter(), syntaxNodeOpt, diagnostics); 582PropertySymbolAdapter property,
FlowAnalysis\AbstractFlowPass.cs (10)
2146var property = left.PropertySymbol; 2201var property = left.PropertySymbol; 2220var property = left.PropertySymbol; 2271var property = node.PropertySymbol; 2837var property = left.PropertySymbol; 3634var property = (PropertySymbol)node.MemberSymbol; 3741private static MethodSymbol GetReadMethod(PropertySymbol property) => 3744private static MethodSymbol GetWriteMethod(PropertySymbol property) => 3825var 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; 2719var property = node.PropertySymbol;
FlowAnalysis\NullableWalker_Patterns.cs (9)
414var reinferredPropertyMap = PooledDictionary<BoundDagPropertyEvaluation, PropertySymbol>.GetInstance(); 479var property = getReInferredProperty(inputType, e); 779var property = getReInferredProperty(inputType, e); 827PropertySymbol getReInferredProperty(TypeSymbol inputType, BoundDagPropertyEvaluation e) 829if (reinferredPropertyMap.TryGetValue(e, out PropertySymbol property)) 836: (PropertySymbol)AsMemberOfType(inputType, e.Property); 965var indexer = indexerAccess.Indexer; 967PropertySymbol property; 987property = (PropertySymbol)AsMemberOfType(inputType, indexer);
FlowAnalysis\NullableWalker.cs (46)
707predicate: member => member is PropertySymbol { IsRequired: true }, 710var property = (PropertySymbol)member; 789symbol = (Symbol?)(f.AssociatedSymbol as PropertySymbol) ?? f; 800case PropertySymbol p when forcePropertyAnalysis: 876case PropertySymbol { IsRequired: true } requiredProperty when GetAccessibleBackingField(requiredProperty, method.ContainingType) is null: 880case PropertySymbol: 994var prop = symbolToInitialize as PropertySymbol ?? (symbolToInitialize as FieldSymbol)?.AssociatedSymbol as PropertySymbol; 1032if (requiredMember is PropertySymbol { IsAbstract: true } abstractProperty) 1035&& isFilterableOverrideOfAbstractProperty(containingType, (PropertySymbol)overridingMember)) 1057var property = (PropertySymbol)requiredMember; 1084=> requiredMember is PropertySymbol property && GetAccessibleBackingField(property, containingType) is { } backingField ? backingField : requiredMember; 1086static bool isFilterableOverrideOfAbstractProperty(NamedTypeSymbol containingType, PropertySymbol property) 1122private static SynthesizedBackingFieldSymbol? GetAccessibleBackingField(PropertySymbol property, NamedTypeSymbol containingType) 2104case PropertySymbol { Name: WellKnownMemberNames.ValuePropertyName } property when 2113case PropertySymbol: 2162var propSymbol = propAccess.PropertySymbol; 2899if (method is SourcePropertyAccessorSymbol { AssociatedSymbol: PropertySymbol prop } && (object)backingField.AssociatedSymbol == prop) 4502if (isSuitableUnionConstruction(type, constructor, out PropertySymbol? valueProperty)) 4512static bool isSuitableUnionConstruction(TypeSymbol type, [NotNullWhen(true)] MethodSymbol? constructor, [NotNullWhen(true)] out PropertySymbol? valueProperty) 4545private void SetUnionValueStateFromConstructorArgument(BoundExpression argument, TypeWithState argumentTypeWithState, int containingSlot, PropertySymbol valueProperty) 4714if (symbol is PropertySymbol property && property.IsExtensionBlockMember() && !argumentResults.IsDefault) 4833if (symbol is PropertySymbol property) 4861if (symbol is PropertySymbol property) 5089var property = AnonymousTypeManager.GetAnonymousTypeProperty(anonymousType, i); 5110static BoundAnonymousPropertyDeclaration? getDeclaration(BoundAnonymousObjectCreationExpression node, PropertySymbol currentProperty, ref int currentDeclarationIndex) 6137if ((member is PropertySymbol { IsIndexedProperty: false } || member.Kind == SymbolKind.Field) && 7617PropertySymbol? property, 11373private bool IsPropertyOutputMoreStrictThanInput(PropertySymbol property) 11394var property = left switch 11445var annotations = memberSymbol switch { PropertySymbol prop => prop.GetFlowAnalysisAnnotations(), FieldSymbol field => GetFieldAnnotations(field), _ => FlowAnalysisAnnotations.None }; 12205private ReinferenceResult<PropertySymbol> ReInferAndVisitExtensionPropertyAccess( 12206BoundNode node, PropertySymbol property, BoundExpression receiver) 12226private ReinferenceResult<PropertySymbol> ReInferAndVisitExtensionPropertyAccess( 12229PropertySymbol property, 12256var property = node.PropertySymbol; 12262ReinferenceResult<PropertySymbol> reinferenceResult = ReInferAndVisitExtensionPropertyAccess(node, property, node.ReceiverOpt); 12299PropertySymbol indexer = node.Indexer; 12303ReinferenceResult<PropertySymbol> reinferrenceResult = ReInferAndVisitExtensionPropertyAccess( 12316indexer = (PropertySymbol)AsMemberOfType(receiverType, indexer); 12388PropertySymbol? unionValue = null; 12394if (member is PropertySymbol { Name: WellKnownMemberNames.HasValuePropertyName } property && 12452var getMethod = ((PropertySymbol)member.OriginalDefinition).GetMethod;
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) 2177public BoundAwaitableInfo(SyntaxNode syntax, BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult, BoundCall? runtimeAsyncAwaitCall, BoundAwaitableValuePlaceholder? runtimeAsyncAwaitCallPlaceholder, bool hasErrors = false) 2196public PropertySymbol? IsCompleted { get; } 2204public BoundAwaitableInfo Update(BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult, BoundCall? runtimeAsyncAwaitCall, BoundAwaitableValuePlaceholder? runtimeAsyncAwaitCallPlaceholder) 5516public BoundDagPropertyEvaluation(SyntaxNode syntax, PropertySymbol property, bool isLengthOrCount, BoundDagTemp input, bool hasErrors = false) 5527public PropertySymbol Property { get; } 5533public BoundDagPropertyEvaluation Update(PropertySymbol property, bool isLengthOrCount, BoundDagTemp input) 5547public BoundDagIndexEvaluation(SyntaxNode syntax, PropertySymbol property, int index, BoundDagTemp input, bool hasErrors = false) 5558public PropertySymbol Property { get; } 5564public BoundDagIndexEvaluation Update(PropertySymbol property, int index, BoundDagTemp input) 6188public BoundPropertyGroup(SyntaxNode syntax, ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 6197public ImmutableArray<PropertySymbol> Properties { get; } 6202public BoundPropertyGroup Update(ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind) 7132public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type, bool hasErrors) 7142public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type) 7153public PropertySymbol Property { get; } 7158public BoundAnonymousPropertyDeclaration Update(PropertySymbol property, TypeSymbol type) 7456public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7473public PropertySymbol PropertySymbol { get; } 7480public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type) 7530public 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) 7554public PropertySymbol Indexer { get; } 7562public ImmutableArray<PropertySymbol> OriginalIndexersOpt { get; } 7567public 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) 7671public BoundDynamicIndexerAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type, bool hasErrors = false) 7692public ImmutableArray<PropertySymbol> ApplicableIndexers { get; } 7697public BoundDynamicIndexerAccess Update(BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type) 11112PropertySymbol property = this.VisitPropertySymbol(node.Property); 11454PropertySymbol? isCompleted = this.VisitPropertySymbol(node.IsCompleted); 12031PropertySymbol property = this.VisitPropertySymbol(node.Property); 12037PropertySymbol property = this.VisitPropertySymbol(node.Property); 12161ImmutableArray<PropertySymbol> properties = this.VisitSymbols<PropertySymbol>(node.Properties); 12330PropertySymbol property = this.VisitPropertySymbol(node.Property); 12391PropertySymbol propertySymbol = this.VisitPropertySymbol(node.PropertySymbol); 12405PropertySymbol indexer = this.VisitPropertySymbol(node.Indexer); 12406ImmutableArray<PropertySymbol> originalIndexersOpt = this.VisitSymbols<PropertySymbol>(node.OriginalIndexersOpt); 12432ImmutableArray<PropertySymbol> applicableIndexers = this.VisitSymbols<PropertySymbol>(node.ApplicableIndexers); 12727PropertySymbol property = GetUpdatedSymbol(node, node.Property); 13441PropertySymbol? isCompleted = GetUpdatedSymbol(node, node.IsCompleted); 14185PropertySymbol property = GetUpdatedSymbol(node, node.Property); 14192PropertySymbol property = GetUpdatedSymbol(node, node.Property); 14408ImmutableArray<PropertySymbol> properties = GetUpdatedArray(node, node.Properties); 14785PropertySymbol property = GetUpdatedSymbol(node, node.Property); 14945PropertySymbol propertySymbol = GetUpdatedSymbol(node, node.PropertySymbol); 14981PropertySymbol indexer = GetUpdatedSymbol(node, node.Indexer); 14982ImmutableArray<PropertySymbol> originalIndexersOpt = GetUpdatedArray(node, node.OriginalIndexersOpt); 15019ImmutableArray<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; 583private void CheckRefReturningPropertyAccess(BoundNode node, PropertySymbol property) 593var 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_AssignmentOperator.cs (3)
197PropertySymbol property = propertyAccess.PropertySymbol; 219PropertySymbol indexer = indexerAccess.Indexer; 306PropertySymbol property,
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
117private void EmbedIfNeedTo(BoundExpression receiver, ImmutableArray<PropertySymbol> properties, SyntaxNode syntaxNode) 128foreach (var p in properties) 685Debug.Assert(!forceReceiverCapturing || methodOrIndexer is PropertySymbol);
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
483PropertySymbol indexer = indexerAccess.Indexer; 511PropertySymbol indexer,
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
268PropertySymbol? invocationListProperty;
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (2)
79PropertySymbol indexer = node.Indexer; 106PropertySymbol indexer,
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
716var 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\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
152PropertySymbol property = p.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)
92private PropertySymbol ImplementedProperty 96return (PropertySymbol)_getter.ExplicitInterfaceImplementations[0].AssociatedSymbol; 100public 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_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)
Operations\CSharpOperationFactory.cs (5)
633PropertySymbol property = boundIndexerAccess.Indexer; 892var property = (PropertySymbol)memberSymbol; 1988((PropertySymbol)enumeratorInfoOpt.CurrentPropertyGetter.AssociatedSymbol).GetPublicSymbol(), 2990case PropertySymbol property:
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)
95public 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; 879public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 886return ImmutableArray<PropertySymbol>.Empty; 892var builder = ArrayBuilder<PropertySymbol>.GetInstance(); 894foreach (var prop in propertiesWithImplementedGetters) 902foreach (var prop in propertiesWithImplementedSetters)
Symbols\MethodSymbolExtensions.cs (1)
234method.AssociatedSymbol is PropertySymbol { HasUnscopedRefAttribute: true };
Symbols\NamedTypeSymbol.cs (35)
359public ImmutableArray<PropertySymbol> Indexers 367return ImmutableArray<PropertySymbol>.Empty; 372ArrayBuilder<PropertySymbol> indexers = ArrayBuilder<PropertySymbol>.GetInstance(); 377Debug.Assert(((PropertySymbol)candidate).IsIndexer); 378indexers.Add((PropertySymbol)candidate); 914if (member is PropertySymbol { ParameterCount: > 0 } prop) 2401internal PropertySymbol? UnionValueProperty(ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2408var valueProperty = (PropertySymbol?)lazyValueProperty; 2416PropertySymbol? result; 2430PropertySymbol? valueProperty = TryGetOwnOrInheritedUnionProperty(WellKnownMemberNames.ValuePropertyName, isSuitableProperty, ref useSiteInfo); 2439return (PropertySymbol?)lazyUnionData._lazyValueProperty; 2441static PropertySymbol? reportDiagnosticAndReturnProperty(NamedTypeSymbol unionTypeDefinition, PropertySymbol? valueProperty, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2464static bool isSuitableProperty(Symbol m, [NotNullWhen(true)] out PropertySymbol? valueProperty) 2466if (m is PropertySymbol prop && hasUnionValueSignature(prop)) 2476static bool hasUnionValueSignature(PropertySymbol property) 2488void addUseSiteInfoForCachedResult(PropertySymbol? valueProperty, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2521internal PropertySymbol? UnionValuePropertyNoUseSiteDiagnostics() 2527private delegate bool IsSuitableUnionProperty(Symbol m, [NotNullWhen(true)] out PropertySymbol? member); 2529private PropertySymbol? TryGetOwnOrInheritedUnionProperty(string memberName, IsSuitableUnionProperty isSuitableUnionMember, ref CompoundUseSiteInfo<AssemblySymbol> membersProviderForDefinitionBasesUseSiteInfo) 2537PropertySymbol? member; 2546PropertySymbol? match = null; 2591static bool getMemberDeclaredInType(NamedTypeSymbol declaringType, string memberName, IsSuitableUnionProperty isSuitableUnionMember, [NotNullWhen(true)] out PropertySymbol? member) 2606internal PropertySymbol? UnionHasValueProperty() 2613return (PropertySymbol?)lazyHasValueProperty; 2616PropertySymbol? result; 2631PropertySymbol? hasValueProperty = TryGetOwnOrInheritedUnionProperty(WellKnownMemberNames.HasValuePropertyName, isSuitableProperty, ref useSiteInfo); 2637return (PropertySymbol?)lazyUnionData._lazyHasValueProperty; 2639static PropertySymbol? checkAndReturnProperty(PropertySymbol? hasValueProperty) 2649static bool isSuitableProperty(Symbol m, [NotNullWhen(true)] out PropertySymbol? hasValueProperty) 2651if (m is PropertySymbol prop && hasHasValueSignature(prop)) 2661static bool hasHasValueSignature(PropertySymbol property)
Symbols\NativeIntegerTypeSymbol.cs (4)
127case PropertySymbol underlyingProperty: 506PropertySymbol underlyingProperty, 529public 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)
26private ImmutableArray<PropertySymbol> _lazyExplicitInterfaceImplementations; 39public RetargetingPropertySymbol(RetargetingModuleSymbol retargetingModule, PropertySymbol underlyingProperty) 152public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 161default(ImmutableArray<PropertySymbol>)); 167private ImmutableArray<PropertySymbol> RetargetExplicitInterfaceImplementations() 179var builder = ArrayBuilder<PropertySymbol>.GetInstance(); 183var 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 (4)
774foreach (PropertySymbol property in type.GetPropertiesToEmit()) 804PropertySymbol? firstIndexer = tryGetFirstIndexer(extensionMarkerTypes); 816static PropertySymbol? tryGetFirstIndexer(ImmutableArray<ExtensionMarkerType> extensionMarkerTypes) 824if (member is PropertySymbol { IsIndexer: true } property)
Symbols\Source\ModifierUtils.cs (2)
582case PropertySymbol { SetMethod: { } method } when !method.IsAsRestrictive(symbol.ContainingType, ref useSiteInfo): 587case PropertySymbol { SetMethod: null }:
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\SourceMemberContainerSymbol.cs (29)
1842else if (member is FieldSymbol { AssociatedSymbol: SourcePropertySymbolBase { PartialDefinitionPart: PropertySymbol definition } implementation } && 1985var wellKnownDerivedTypesProperty = (PropertySymbol?)compilation.GetWellKnownTypeMember(WellKnownMember.System_Runtime_CompilerServices_IsClosedTypeAttribute__DerivedTypes); 2436var indexersBySignature = new Dictionary<PropertySymbol, PropertySymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2448PropertySymbol indexer = (PropertySymbol)symbol; 2498PropertySymbol indexer, 2501Dictionary<PropertySymbol, PropertySymbol> indexersBySignature, 2535if (indexersBySignature.TryGetValue(indexer, out var prevIndexerBySignature)) 2746var propertySymbol = (PropertySymbol)symbol; 4549PropertySymbol propertySymbol, 4634private static Location GetAccessorOrPropertyLocation(PropertySymbol propertySymbol, bool getNotSet) 4653private static bool ParametersMatchPropertyAccessor(PropertySymbol propertySymbol, bool getNotSet, ImmutableArray<ParameterSymbol> methodParams) 4824if (member is PropertySymbol property) 4864if (member is PropertySymbol { IsIndexer: true }) 5133PropertySymbol? equalityContract = isRecordClass ? addEqualityContract() : null; 5159Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol { GetMethod.IsEffectivelyReadOnly: false })); 5170Debug.Assert(positionalMembers.All(p => p is PropertySymbol or FieldSymbol)); 5422ImmutableArray<PropertySymbol>.Empty); 5446else if (existingMember is PropertySymbol { IsStatic: false, GetMethod: { } } prop 5504MethodSymbol addGetHashCode(PropertySymbol? equalityContract) 5538PropertySymbol addEqualityContract() 5548ImmutableArray<PropertySymbol>.Empty); 5550PropertySymbol equalityContract; 5560equalityContract = (PropertySymbol)existingEqualityContractProperty; 5597MethodSymbol addThisEquals(PropertySymbol? equalityContract)
Symbols\Source\SourceNamedTypeSymbol.cs (4)
1808var derivedTypesProperty = (PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Runtime_CompilerServices_IsClosedTypeAttribute__DerivedTypes); 1999if (Indexers.FirstOrDefault() is PropertySymbol indexerSymbol) 2030foreach (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)
854internal sealed override PropertySymbol? PartialDefinitionPart => SourcePartialDefinitionPart; 855internal sealed override PropertySymbol? PartialImplementationPart => SourcePartialImplementationPart;
Symbols\Source\SourcePropertySymbolBase.cs (10)
58private ImmutableArray<PropertySymbol> _lazyExplicitInterfaceImplementations; 123_lazyExplicitInterfaceImplementations = ImmutableArray<PropertySymbol>.Empty; 206PropertySymbol? explicitlyImplementedProperty = null; 230PropertySymbol? overriddenOrImplementedProperty; 281ImmutableArray<PropertySymbol>.Empty : 683public sealed override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 921var overriddenProperty = (PropertySymbol)this.GetLeastOverriddenMember(this.ContainingType); 1040PropertySymbol? explicitlyImplementedProperty = ExplicitInterfaceImplementations.FirstOrDefault(); 1237private 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)
20internal SubstitutedPropertySymbol(SubstitutedNamedTypeSymbol containingType, PropertySymbol originalDefinition) 56public override PropertySymbol OriginalDefinition 111private ImmutableArray<PropertySymbol> _lazyExplicitInterfaceImplementations; 115public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 124default(ImmutableArray<PropertySymbol>));
Symbols\Symbol.cs (5)
668var property = (PropertySymbol)this; 692if (!((PropertySymbol)method.AssociatedSymbol).CanCallMethodsDirectly()) 747return ((PropertySymbol)method.AssociatedSymbol).CanCallMethodsDirectly(); 1704builder.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)
14private readonly PropertySymbol _interfaceProperty; 18PropertySymbol interfaceProperty, 48public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations => ImmutableArray.Create(_interfaceProperty);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (16)
334(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_ICollection__Count)!, 339(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_ICollection__IsSynchronized)!, 344(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_ICollection__SyncRoot)!, 354(PropertySymbol)((MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__get_Item)!).AssociatedSymbol, 360(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__IsFixedSize)!, 365(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__IsReadOnly)!, 412((PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IReadOnlyCollection_T__Count)!).AsMember(iReadOnlyCollectionT), 417((PropertySymbol)((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IReadOnlyList_T__get_Item)!).AssociatedSymbol).AsMember(iReadOnlyListT), 423((PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_ICollection_T__Count)!).AsMember(iCollectionT), 428((PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_ICollection_T__IsReadOnly)!).AsMember(iCollectionT), 458((PropertySymbol)((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IList_T__get_Item)!).AssociatedSymbol).AsMember(iListT), 532var listMember = (PropertySymbol)containingType.GetFieldTypeMember(WellKnownMember.System_Collections_Generic_List_T__Count); 717var listMember = (PropertySymbol)((MethodSymbol)containingType.GetFieldTypeMember(WellKnownMember.System_Collections_Generic_List_T__get_Item)).AssociatedSymbol; 777static 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)
104internal static void VerifyOverridesEqualityContractFromBase(PropertySymbol overriding, BindingDiagnosticBag diagnostics) 127var 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)
209SymbolKind.Property => F.Property(F.This(), (PropertySymbol)member), 266var property = (PropertySymbol)m; 326var property = (PropertySymbol)member; 347private static bool IsPrintableProperty(PropertySymbol property)
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
112public override TypeWithAnnotations TypeWithAnnotations => ((PropertySymbol)((SourcePropertyAccessorSymbol)ContainingSymbol).AssociatedSymbol).TypeWithAnnotations;
Symbols\Synthesized\SynthesizedEmbeddedAttributePropertySymbol.cs (1)
36public 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