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
679 references to PropertySymbol
Microsoft.CodeAnalysis.CSharp (679)
Binder\Binder.cs (1)
804internal void ReportDisallowedExtensionBlockIndexer(PropertySymbol property, SyntaxNode syntax, BindingDiagnosticBag diagnostics)
Binder\Binder.ValueChecks.cs (18)
59internal static MethodInfo CreateFromPropertyGetter(PropertySymbol property) 64internal static MethodInfo CreateFromPropertySetter(PropertySymbol property) 631PropertySymbol indexer = indexerAccess.Indexer; 1995var propertySymbol = GetPropertySymbol(expr, out receiver, out propertySyntax); 2856case PropertySymbol property: 3833var indexerSymbol = indexerAccess.Indexer; 3848var indexerSymbol = indexerAccess.Indexer; 4112var indexerSymbol = indexerAccess.Indexer; 4136var indexerSymbol = indexerAccess.Indexer; 4224var propertySymbol = propertyAccess.PropertySymbol; 4482var indexerSymbol = indexerAccess.Indexer; 4497var indexerSymbol = indexerAccess.Indexer; 4924PropertySymbol { IsIndexer: true } indexer => getIndexerEscape(indexer, left, rightEscape), 4925PropertySymbol property => getPropertyEscape(property, rightEscape), 4942PropertySymbol indexer, 4999PropertySymbol property, 5211var indexerSymbol = indexerAccess.Indexer; 5230var 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)
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) 2163private ImmutableArray<BoundExpression> BuildArgumentsForErrorRecovery(AnalyzedArguments analyzedArguments, ImmutableArray<PropertySymbol> properties) 2166foreach (var p in properties)
Binder\Binder_Lookup.cs (3)
1657var property = ((PropertySymbol)symbol).GetLeastOverriddenProperty(this.ContainingType); 1847type = ((PropertySymbol)symbol).Type;
Binder\Binder_Patterns.cs (24)
38internal static PropertySymbol? GetUnionTypeValueProperty(NamedTypeSymbol inputUnionType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 40(NamedTypeSymbol container, PropertySymbol? valueProperty) = TryGetOwnOrInheritedUnionProperty(inputUnionType, WellKnownMemberNames.ValuePropertyName, isSuitableProperty, ref useSiteInfo); 46static PropertySymbol? reportDiagnosticAndReturnProperty(NamedTypeSymbol memberProvider, PropertySymbol? valueProperty, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 61static bool isSuitableProperty(Symbol m, [NotNullWhen(true)] out PropertySymbol? valueProperty) 63if (m is PropertySymbol prop && hasUnionValueSignature(prop)) 73static bool hasUnionValueSignature(PropertySymbol property) 86private delegate bool IsSuitableUnionProperty(Symbol m, [NotNullWhen(true)] out PropertySymbol? member); 88private static (NamedTypeSymbol, PropertySymbol?) TryGetOwnOrInheritedUnionProperty(NamedTypeSymbol inputUnionType, string memberName, IsSuitableUnionProperty isSuitableUnionMember, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 93PropertySymbol? member; 104PropertySymbol? match = null; 169static bool getMemberDeclaredInType(NamedTypeSymbol declaringType, string memberName, IsSuitableUnionProperty isSuitableUnionMember, [NotNullWhen(true)] out PropertySymbol? member) 184internal static PropertySymbol? GetUnionTypeValuePropertyNoUseSiteDiagnostics(NamedTypeSymbol inputUnionType) 195internal static PropertySymbol? GetUnionTypeHasValueProperty(NamedTypeSymbol inputUnionType) 198(_, PropertySymbol? hasValueProperty) = TryGetOwnOrInheritedUnionProperty(inputUnionType, WellKnownMemberNames.HasValuePropertyName, isSuitableProperty, ref useSiteInfo); 201static PropertySymbol? checkAndReturnProperty(PropertySymbol? hasValueProperty) 211static bool isSuitableProperty(Symbol m, [NotNullWhen(true)] out PropertySymbol? hasValueProperty) 213if (m is PropertySymbol prop && hasHasValueSignature(prop)) 223static bool hasHasValueSignature(PropertySymbol property) 529internal static bool IsUnionTypeHasValueProperty(NamedTypeSymbol unionType, PropertySymbol property) 899private bool IsCountableAndIndexable(SyntaxNode node, TypeSymbol inputType, out PropertySymbol? lengthProperty) 2278isLengthOrCount = IsCountableAndIndexable(node, receiverType, out PropertySymbol? lengthProperty) && 2331case 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\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)
1085var 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)
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)
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 (44)
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 2090case PropertySymbol: 2139var propSymbol = propAccess.PropertySymbol; 2857if (method is SourcePropertyAccessorSymbol { AssociatedSymbol: PropertySymbol prop } && (object)backingField.AssociatedSymbol == prop) 4460if (isSuitableUnionConstruction(type, constructor, out PropertySymbol? valueProperty)) 4470static bool isSuitableUnionConstruction(TypeSymbol type, [NotNullWhen(true)] MethodSymbol? constructor, [NotNullWhen(true)] out PropertySymbol? valueProperty) 4503private void SetUnionValueStateFromConstructorArgument(BoundExpression argument, TypeWithState argumentTypeWithState, int containingSlot, PropertySymbol valueProperty) 4672if (symbol is PropertySymbol property && property.IsExtensionBlockMember() && !argumentResults.IsDefault) 4791if (symbol is PropertySymbol property) 4819if (symbol is PropertySymbol property) 5047var property = AnonymousTypeManager.GetAnonymousTypeProperty(anonymousType, i); 5068static BoundAnonymousPropertyDeclaration? getDeclaration(BoundAnonymousObjectCreationExpression node, PropertySymbol currentProperty, ref int currentDeclarationIndex) 6079if ((member is PropertySymbol { IsIndexedProperty: false } || member.Kind == SymbolKind.Field) && 7559PropertySymbol? property, 11304private bool IsPropertyOutputMoreStrictThanInput(PropertySymbol property) 11325var property = left switch 11376var annotations = memberSymbol switch { PropertySymbol prop => prop.GetFlowAnalysisAnnotations(), FieldSymbol field => GetFieldAnnotations(field), _ => FlowAnalysisAnnotations.None }; 12136private ReinferenceResult<PropertySymbol> ReInferAndVisitExtensionPropertyAccess( 12137BoundNode node, PropertySymbol property, BoundExpression receiver) 12157private ReinferenceResult<PropertySymbol> ReInferAndVisitExtensionPropertyAccess( 12160PropertySymbol property, 12187var property = node.PropertySymbol; 12193ReinferenceResult<PropertySymbol> reinferenceResult = ReInferAndVisitExtensionPropertyAccess(node, property, node.ReceiverOpt); 12230PropertySymbol indexer = node.Indexer; 12234ReinferenceResult<PropertySymbol> reinferrenceResult = ReInferAndVisitExtensionPropertyAccess( 12247indexer = (PropertySymbol)AsMemberOfType(receiverType, indexer); 12319PropertySymbol? unionValue = null; 12325if (member is PropertySymbol { Name: WellKnownMemberNames.HasValuePropertyName } property && 12383var getMethod = ((PropertySymbol)member.OriginalDefinition).GetMethod;
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);
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) 2174public BoundAwaitableInfo(SyntaxNode syntax, BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult, BoundCall? runtimeAsyncAwaitCall, BoundAwaitableValuePlaceholder? runtimeAsyncAwaitCallPlaceholder, bool hasErrors = false) 2193public PropertySymbol? IsCompleted { get; } 2201public BoundAwaitableInfo Update(BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult, BoundCall? runtimeAsyncAwaitCall, BoundAwaitableValuePlaceholder? runtimeAsyncAwaitCallPlaceholder) 5513public BoundDagPropertyEvaluation(SyntaxNode syntax, PropertySymbol property, bool isLengthOrCount, BoundDagTemp input, bool hasErrors = false) 5524public PropertySymbol Property { get; } 5530public BoundDagPropertyEvaluation Update(PropertySymbol property, bool isLengthOrCount, BoundDagTemp input) 5544public BoundDagIndexEvaluation(SyntaxNode syntax, PropertySymbol property, int index, BoundDagTemp input, bool hasErrors = false) 5555public PropertySymbol Property { get; } 5561public BoundDagIndexEvaluation Update(PropertySymbol property, int index, BoundDagTemp input) 6185public BoundPropertyGroup(SyntaxNode syntax, ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 6194public ImmutableArray<PropertySymbol> Properties { get; } 6199public BoundPropertyGroup Update(ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind) 7129public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type, bool hasErrors) 7139public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type) 7150public PropertySymbol Property { get; } 7155public BoundAnonymousPropertyDeclaration Update(PropertySymbol property, TypeSymbol type) 7453public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7470public PropertySymbol PropertySymbol { get; } 7477public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type) 7527public 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) 7551public PropertySymbol Indexer { get; } 7559public ImmutableArray<PropertySymbol> OriginalIndexersOpt { get; } 7564public 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) 7668public BoundDynamicIndexerAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type, bool hasErrors = false) 7689public ImmutableArray<PropertySymbol> ApplicableIndexers { get; } 7694public BoundDynamicIndexerAccess Update(BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type) 11109PropertySymbol property = this.VisitPropertySymbol(node.Property); 11451PropertySymbol? isCompleted = this.VisitPropertySymbol(node.IsCompleted); 12028PropertySymbol property = this.VisitPropertySymbol(node.Property); 12034PropertySymbol property = this.VisitPropertySymbol(node.Property); 12158ImmutableArray<PropertySymbol> properties = this.VisitSymbols<PropertySymbol>(node.Properties); 12327PropertySymbol property = this.VisitPropertySymbol(node.Property); 12388PropertySymbol propertySymbol = this.VisitPropertySymbol(node.PropertySymbol); 12402PropertySymbol indexer = this.VisitPropertySymbol(node.Indexer); 12403ImmutableArray<PropertySymbol> originalIndexersOpt = this.VisitSymbols<PropertySymbol>(node.OriginalIndexersOpt); 12429ImmutableArray<PropertySymbol> applicableIndexers = this.VisitSymbols<PropertySymbol>(node.ApplicableIndexers); 12724PropertySymbol 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; 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.PatternLocalRewriter.cs (1)
152PropertySymbol property = p.Property;
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (3)
197PropertySymbol property = propertyAccess.PropertySymbol; 219PropertySymbol indexer = indexerAccess.Indexer; 300PropertySymbol 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)
444PropertySymbol indexer = indexerAccess.Indexer; 472PropertySymbol 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\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.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)
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 (7)
316public ImmutableArray<PropertySymbol> Indexers 324return ImmutableArray<PropertySymbol>.Empty; 329ArrayBuilder<PropertySymbol> indexers = ArrayBuilder<PropertySymbol>.GetInstance(); 334Debug.Assert(((PropertySymbol)candidate).IsIndexer); 335indexers.Add((PropertySymbol)candidate); 838if (member is PropertySymbol { ParameterCount: > 0 } prop)
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)
555case PropertySymbol { SetMethod: { } method } when !method.IsAsRestrictive(symbol.ContainingType, ref useSiteInfo): 560case PropertySymbol { SetMethod: null }:
Symbols\Source\SourceMemberContainerSymbol.cs (27)
1843else if (member is FieldSymbol { AssociatedSymbol: SourcePropertySymbolBase { PartialDefinitionPart: PropertySymbol definition } implementation } && 2415var indexersBySignature = new Dictionary<PropertySymbol, PropertySymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2427PropertySymbol indexer = (PropertySymbol)symbol; 2477PropertySymbol indexer, 2480Dictionary<PropertySymbol, PropertySymbol> indexersBySignature, 2514if (indexersBySignature.TryGetValue(indexer, out var prevIndexerBySignature)) 2725var propertySymbol = (PropertySymbol)symbol; 4528PropertySymbol propertySymbol, 4613private static Location GetAccessorOrPropertyLocation(PropertySymbol propertySymbol, bool getNotSet) 4632private static bool ParametersMatchPropertyAccessor(PropertySymbol propertySymbol, bool getNotSet, ImmutableArray<ParameterSymbol> methodParams) 4803if (member is PropertySymbol property) 4843if (member is PropertySymbol { IsIndexer: true }) 5112PropertySymbol? equalityContract = isRecordClass ? addEqualityContract() : null; 5138Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol { GetMethod.IsEffectivelyReadOnly: false })); 5149Debug.Assert(positionalMembers.All(p => p is PropertySymbol or FieldSymbol)); 5401ImmutableArray<PropertySymbol>.Empty); 5425else if (existingMember is PropertySymbol { IsStatic: false, GetMethod: { } } prop 5483MethodSymbol addGetHashCode(PropertySymbol? equalityContract) 5517PropertySymbol addEqualityContract() 5527ImmutableArray<PropertySymbol>.Empty); 5529PropertySymbol equalityContract; 5539equalityContract = (PropertySymbol)existingEqualityContractProperty; 5576MethodSymbol 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)
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); 1017PropertySymbol? explicitlyImplementedProperty = ExplicitInterfaceImplementations.FirstOrDefault(); 1229private 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(); 1711builder.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)
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)
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