8 types derived from PropertySymbol
Microsoft.CodeAnalysis.CSharp (8)
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
16internal class SynthesizedStateMachineProperty : PropertySymbol, ISynthesizedMethodBodyImplementationSymbol
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
19internal sealed class AnonymousTypePropertySymbol : PropertySymbol
Symbols\ErrorPropertySymbol.cs (1)
25internal sealed class ErrorPropertySymbol : PropertySymbol
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
28: PropertySymbol
Symbols\SignatureOnlyPropertySymbol.cs (1)
19internal sealed class SignatureOnlyPropertySymbol : PropertySymbol
Symbols\Source\SourcePropertySymbolBase.cs (1)
21internal abstract class SourcePropertySymbolBase : PropertySymbol, IAttributeTargetSymbol
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
10internal sealed class SynthesizedReadOnlyListProperty : PropertySymbol
Symbols\Wrapped\WrappedPropertySymbol.cs (1)
21internal abstract class WrappedPropertySymbol : PropertySymbol
604 references to PropertySymbol
Microsoft.CodeAnalysis.CSharp (602)
Binder\Binder.ValueChecks.cs (17)
68internal static MethodInfo Create(PropertySymbol property) 76internal static MethodInfo Create(PropertySymbol property, AccessorKind accessorKind) => 1718var propertySymbol = GetPropertySymbol(expr, out receiver, out propertySyntax); 2607case PropertySymbol property: 3571var indexerSymbol = indexerAccess.Indexer; 3593var indexerSymbol = indexerAccess.Indexer; 3870var indexerSymbol = indexerAccess.Indexer; 3901var indexerSymbol = indexerAccess.Indexer; 4012var propertySymbol = propertyAccess.PropertySymbol; 4272var indexerSymbol = indexerAccess.Indexer; 4294var indexerSymbol = indexerAccess.Indexer; 4721PropertySymbol { IsIndexer: true } indexer => getIndexerEscape(indexer, left, rightEscape), 4722PropertySymbol property => getPropertyEscape(property, rightEscape), 4739PropertySymbol indexer, 4792PropertySymbol property, 5006var indexerSymbol = indexerAccess.Indexer; 5032var indexerSymbol = indexerAccess.Indexer;
Binder\Binder_AnonymousTypes.cs (1)
126declarators.Add(new BoundAnonymousPropertyDeclaration(fieldSyntaxNodes[i], (PropertySymbol)symbol, field.Type));
Binder\Binder_Attributes.cs (6)
533var propertySymbol = (PropertySymbol)namedArgumentNameSymbol; 578var propertySymbol = namedArgumentNameSymbol as PropertySymbol; 636var propertySymbol = ((PropertySymbol)namedArgumentNameSymbol).GetLeastOverriddenProperty(this.ContainingType);
Binder\Binder_Await.cs (3)
58out PropertySymbol? isCompleted, 256out PropertySymbol? isCompleted, 368private bool GetIsCompletedProperty(TypeSymbol awaiterType, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, [NotNullWhen(true)] out PropertySymbol? isCompletedProperty)
Binder\Binder_Crefs.cs (1)
834explicitInterfaceImplementations: ImmutableArray<PropertySymbol>.Empty);
Binder\Binder_Expressions.cs (42)
1513ContainingMember() is MethodSymbol { MethodKind: MethodKind.PropertyGet or MethodKind.PropertySet, AssociatedSymbol: PropertySymbol { IsIndexer: false } }) 2213return BindPropertyAccess(node, receiver, (PropertySymbol)symbol, diagnostics, resultKind, hasErrors: isError); 6040PropertySymbol propertySymbol, 8037case PropertySymbol propertySymbol: 8330resultType = ((PropertySymbol)symbolOpt).Type; 8474result = BindPropertyAccess(node, left, (PropertySymbol)symbol, diagnostics, lookupResult.Kind, hasErrors: wasError); 8633OverloadResolutionResult<PropertySymbol>? propertyResult = arity != 0 || acceptOnlyMethods ? null : resolveProperties(left, lookupResult, binder, ref actualReceiverArguments, ref useSiteInfo); 8780static OverloadResolutionResult<PropertySymbol>? resolveProperties( 8787ArrayBuilder<PropertySymbol>? properties = null; 8790if (member is PropertySymbol property) 8792properties ??= ArrayBuilder<PropertySymbol>.GetInstance(); 8808OverloadResolutionResult<PropertySymbol> overloadResolutionResult = OverloadResolutionResult<PropertySymbol>.GetInstance(); 9052PropertySymbol propertySymbol, 9331foreach (PropertySymbol property in members) 9667return BindDynamicIndexer(node, expr, arguments, ImmutableArray<PropertySymbol>.Empty, diagnostics); 9991ArrayBuilder<PropertySymbol> indexerGroup = ArrayBuilder<PropertySymbol>.GetInstance(); 9995indexerGroup.Add((PropertySymbol)symbol); 10006private static readonly Func<PropertySymbol, bool> s_isIndexedPropertyWithNonOptionalArguments = property => 10057private BoundExpression BindIndexedPropertyAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<PropertySymbol> propertyGroup, AnalyzedArguments arguments, BindingDiagnosticBag diagnostics) 10062var properties = ArrayBuilder<PropertySymbol>.GetInstance(); 10074ImmutableArray<PropertySymbol> applicableProperties, 10117ArrayBuilder<PropertySymbol> propertyGroup, 10122OverloadResolutionResult<PropertySymbol> overloadResolutionResult = OverloadResolutionResult<PropertySymbol>.GetInstance(); 10157ArrayBuilder<PropertySymbol> propertyGroup, 10159OverloadResolutionResult<PropertySymbol> overloadResolutionResult, 10170ImmutableArray<PropertySymbol> candidates = propertyGroup.ToImmutable(); 10184var candidate = candidates[0]; 10205PropertySymbol property = (candidates.Length == 1) ? candidates[0] : CreateErrorPropertySymbol(candidates); 10218MemberResolutionResult<PropertySymbol> resolutionResult = overloadResolutionResult.ValidResult; 10219PropertySymbol property = resolutionResult.Member; 10229this.CheckAndCoerceArguments<PropertySymbol>(syntax, resolutionResult, analyzedArguments, diagnostics, receiver, invokedAsExtensionMethod: false, out argsToParams); 10412candidate is PropertySymbol property && 10422var properties = ArrayBuilder<PropertySymbol>.GetInstance(); 10528if (TryLookupLengthOrCount(syntax, receiverPlaceholder.Type, lookupResult, out var lengthOrCountProperty, diagnostics)) 10548[NotNullWhen(true)] out PropertySymbol? lengthOrCountProperty, 10560bool tryLookupLengthOrCount(SyntaxNode syntax, string propertyName, [NotNullWhen(true)] out PropertySymbol? valid, BindingDiagnosticBag diagnostics) 10576lookupResult.Symbols[0] is PropertySymbol property && 10595private ErrorPropertySymbol CreateErrorPropertySymbol(ImmutableArray<PropertySymbol> propertyGroup) 10598var candidate = propertyGroup[0];
Binder\Binder_Invocation.cs (3)
1378internal ThreeState ReceiverIsSubjectToCloning(BoundExpression? receiver, PropertySymbol property) 2066private ImmutableArray<BoundExpression> BuildArgumentsForErrorRecovery(AnalyzedArguments analyzedArguments, ImmutableArray<PropertySymbol> properties) 2069foreach (var p in properties)
Binder\Binder_Lookup.cs (3)
1641var property = ((PropertySymbol)symbol).GetLeastOverriddenProperty(this.ContainingType); 1831type = ((PropertySymbol)symbol).Type;
Binder\Binder_Patterns.cs (4)
346private bool IsCountableAndIndexable(SyntaxNode node, TypeSymbol inputType, out PropertySymbol? lengthProperty) 363hasErrors |= !TryGetSpecialTypeMember(Compilation, SpecialMember.System_Array__Length, node, diagnostics, out PropertySymbol lengthProperty); 1496isLengthOrCount = IsCountableAndIndexable(node, receiverType, out PropertySymbol? lengthProperty) && 1532PropertySymbol property => property.Type,
Binder\Binder_Statements.cs (4)
1637internal static PropertySymbol GetPropertySymbol(BoundExpression expr, out BoundExpression receiver, out SyntaxNode propertySyntax) 1646PropertySymbol propertySymbol; 1774private static bool AccessingAutoPropertyFromConstructor(BoundExpression? receiver, PropertySymbol propertySymbol, Symbol fromMember, AccessorKind accessorKind) 1790private static bool HasSynthesizedBackingField(PropertySymbol propertySymbol, [NotNullWhen(true)] out SourcePropertySymbolBase? sourcePropertyDefinition)
Binder\Binder_Symbols.cs (2)
1574private static readonly Func<Symbol, PropertySymbol> s_toPropertySymbolFunc = s => (PropertySymbol)s;
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1279PropertySymbol property = GetPropertySymbol(propertyDeclSyntax, outerBinder);
Binder\DecisionDagBuilder.cs (5)
327var getLengthProperty = (PropertySymbol)pattern.GetLengthMethod.AssociatedSymbol; 329var getItemProperty = (PropertySymbol)pattern.GetItemMethod.AssociatedSymbol; 620case PropertySymbol property:
Binder\DecisionDagBuilder_ListPatterns.cs (1)
39var lengthProperty = Binder.GetPropertySymbol(list.LengthAccess, out _, out _);
Binder\ForEachLoopBinder.cs (2)
1054builder.ElementTypeWithAnnotations = ((PropertySymbol)builder.CurrentPropertyGetter.AssociatedSymbol).TypeWithAnnotations; 1702MethodSymbol currentPropertyGetterCandidate = ((PropertySymbol)lookupSymbol).GetOwnOrInheritedGetMethod();
Binder\LocalBinderFactory.cs (2)
314PropertySymbol property => property.Parameters, 330case PropertySymbol property:
Binder\RefSafetyAnalysis.cs (1)
905var indexer = node.Indexer;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (5)
165ArrayBuilder<PropertySymbol> indexers, 168OverloadResolutionResult<PropertySymbol> result, 546case PropertySymbol property: 1464return ((PropertySymbol)member).HidesBasePropertiesByName; 4384else if (member is PropertySymbol property)
BoundTree\BoundExpression.cs (1)
374foreach (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)
268PropertySymbol indexer, 272ImmutableArray<PropertySymbol> originalIndexers) 294PropertySymbol indexer, 309PropertySymbol indexer,
Compilation\CSharpSemanticModel.cs (6)
3495ImmutableArray<PropertySymbol> originalIndexersOpt = indexerAccess.OriginalIndexersOpt; 3653memberGroup = dynamicIndexer.ApplicableIndexers.Cast<PropertySymbol, Symbol>(); 4125PropertySymbol indexer = (PropertySymbol)symbol; 4412propertyGroup = boundNode.Properties.Cast<PropertySymbol, Symbol>(); 4645if (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)
990currentProperty: ((PropertySymbol)enumeratorInfoOpt.CurrentPropertyGetter?.AssociatedSymbol).GetPublicSymbol(),
Compilation\SyntaxTreeSemanticModel.cs (3)
1562return ((PropertySymbol)GetDeclaredMemberSymbol(declarationSyntax)).GetPublicSymbol(); 1573return ((PropertySymbol)GetDeclaredMemberSymbol(declarationSyntax)).GetPublicSymbol(); 2116var 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)
890public 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)
125public override object VisitProperty(PropertySymbol symbol, StringBuilder builder)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (3)
435public override Symbol? VisitProperty(PropertySymbol symbol) 720private bool ArePropertiesEqual(PropertySymbol property, PropertySymbol other)
Emitter\Model\AttributeDataAdapter.cs (1)
171type = ((PropertySymbol)symbol).Type;
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
676foreach (PropertySymbol property in AdaptedNamedTypeSymbol.GetPropertiesToEmit()) 1040internal virtual IEnumerable<PropertySymbol> GetPropertiesToEmit() 1048yield return (PropertySymbol)m;
Emitter\Model\PropertySymbolAdapter.cs (2)
328internal PropertySymbolAdapter(PropertySymbol underlyingPropertySymbol) 340internal PropertySymbol AdaptedPropertySymbol { get; }
Emitter\NoPia\EmbeddedType.cs (1)
307TypeManager.EmbedProperty(this, ((PropertySymbol)s).GetCciAdapter(), syntaxNodeOpt, diagnostics);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
514EmbedProperty(type, ((PropertySymbol)propertyOrEvent).GetCciAdapter(), syntaxNodeOpt, diagnostics);
FlowAnalysis\AbstractFlowPass.cs (10)
2144var property = left.PropertySymbol; 2199var property = left.PropertySymbol; 2218var property = left.PropertySymbol; 2269var property = node.PropertySymbol; 2814var property = left.PropertySymbol; 3602var property = (PropertySymbol)node.MemberSymbol; 3699private static MethodSymbol GetReadMethod(PropertySymbol property) => 3702private static MethodSymbol GetWriteMethod(PropertySymbol property) => 3783var symbol = propertyAccessOpt.PropertySymbol;
FlowAnalysis\DefiniteAssignment.cs (4)
356case (FieldSymbol or PropertySymbol) and { IsStatic: false, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } }: 1106var propSymbol = propAccess.PropertySymbol; 1438var property = propertyAccess.PropertySymbol; 2738var property = node.PropertySymbol;
FlowAnalysis\NullableWalker.cs (31)
664predicate: member => member is PropertySymbol { IsRequired: true }, 667var property = (PropertySymbol)member; 742symbol = (Symbol?)(f.AssociatedSymbol as PropertySymbol) ?? f; 753case PropertySymbol p when forcePropertyAnalysis: 824case PropertySymbol { IsRequired: true }: 826case PropertySymbol: 939var prop = symbolToInitialize as PropertySymbol ?? (symbolToInitialize as FieldSymbol)?.AssociatedSymbol as PropertySymbol; 976if (requiredMember is PropertySymbol { IsAbstract: true } abstractProperty) 979&& isFilterableOverrideOfAbstractProperty((PropertySymbol)overridingMember)) 1001var property = (PropertySymbol)requiredMember; 1026static bool isFilterableOverrideOfAbstractProperty(PropertySymbol property) 2076var propSymbol = propAccess.PropertySymbol; 2786if (method is SourcePropertyAccessorSymbol { AssociatedSymbol: PropertySymbol prop } && (object)backingField.AssociatedSymbol == prop) 4284((PropertySymbol?)symbol)?.Parameters ?? default, objectInitializer.ArgsToParamsOpt, 4343argumentsCompletion?.Invoke(argumentResults, ((PropertySymbol?)symbol)?.Parameters ?? default, null); 4667var property = AnonymousTypeManager.GetAnonymousTypeProperty(anonymousType, i); 4688static BoundAnonymousPropertyDeclaration? getDeclaration(BoundAnonymousObjectCreationExpression node, PropertySymbol currentProperty, ref int currentDeclarationIndex) 5637if ((member is PropertySymbol { IsIndexedProperty: false } || member.Kind == SymbolKind.Field) && 7007PropertySymbol? property, 7012return VisitArguments<PropertySymbol>(node, arguments, refKindsOpt, parametersOpt: property is null ? default : property.Parameters, argsToParamsOpt, defaultArguments, expanded, invokedAsExtensionMethod: false).results; 10360private bool IsPropertyOutputMoreStrictThanInput(PropertySymbol property) 10381var property = left switch 10434var annotations = memberSymbol switch { PropertySymbol prop => prop.GetFlowAnalysisAnnotations(), FieldSymbol field => GetFieldAnnotations(field), _ => FlowAnalysisAnnotations.None }; 11073var property = node.PropertySymbol; 11130var indexer = node.Indexer; 11134indexer = (PropertySymbol)AsMemberOfType(receiverType, indexer); 11245var getMethod = ((PropertySymbol)member.OriginalDefinition).GetMethod;
FlowAnalysis\NullableWalker_Patterns.cs (2)
534var property = (PropertySymbol)AsMemberOfType(inputType, e.Property); // Tracked by https://github.com/dotnet/roslyn/issues/76130 : this needs to handle extension properties
Generated\BoundNodes.xml.Generated.cs (54)
339public BoundPropertyEqualsValue(SyntaxNode syntax, PropertySymbol property, ImmutableArray<LocalSymbol> locals, BoundExpression value, bool hasErrors = false) 350public PropertySymbol Property { get; } 355public BoundPropertyEqualsValue Update(PropertySymbol property, ImmutableArray<LocalSymbol> locals, BoundExpression value) 2145public BoundAwaitableInfo(SyntaxNode syntax, BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult, bool hasErrors = false) 2158public PropertySymbol? IsCompleted { get; } 2164public BoundAwaitableInfo Update(BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult) 5474public BoundDagPropertyEvaluation(SyntaxNode syntax, PropertySymbol property, bool isLengthOrCount, BoundDagTemp input, bool hasErrors = false) 5485public PropertySymbol Property { get; } 5491public BoundDagPropertyEvaluation Update(PropertySymbol property, bool isLengthOrCount, BoundDagTemp input) 5505public BoundDagIndexEvaluation(SyntaxNode syntax, PropertySymbol property, int index, BoundDagTemp input, bool hasErrors = false) 5516public PropertySymbol Property { get; } 5522public BoundDagIndexEvaluation Update(PropertySymbol property, int index, BoundDagTemp input) 6118public BoundPropertyGroup(SyntaxNode syntax, ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 6127public ImmutableArray<PropertySymbol> Properties { get; } 6132public BoundPropertyGroup Update(ImmutableArray<PropertySymbol> properties, BoundExpression? receiverOpt, LookupResultKind resultKind) 7016public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type, bool hasErrors) 7026public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type) 7037public PropertySymbol Property { get; } 7042public BoundAnonymousPropertyDeclaration Update(PropertySymbol property, TypeSymbol type) 7340public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7357public PropertySymbol PropertySymbol { get; } 7364public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type) 7414public 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) 7438public PropertySymbol Indexer { get; } 7446public ImmutableArray<PropertySymbol> OriginalIndexersOpt { get; } 7451public 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) 7555public BoundDynamicIndexerAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type, bool hasErrors = false) 7576public ImmutableArray<PropertySymbol> ApplicableIndexers { get; } 7581public BoundDynamicIndexerAccess Update(BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type) 10847PropertySymbol property = this.VisitPropertySymbol(node.Property); 11182PropertySymbol? isCompleted = this.VisitPropertySymbol(node.IsCompleted); 11755PropertySymbol property = this.VisitPropertySymbol(node.Property); 11761PropertySymbol property = this.VisitPropertySymbol(node.Property); 11880ImmutableArray<PropertySymbol> properties = this.VisitSymbols<PropertySymbol>(node.Properties); 12044PropertySymbol property = this.VisitPropertySymbol(node.Property); 12105PropertySymbol propertySymbol = this.VisitPropertySymbol(node.PropertySymbol); 12119PropertySymbol indexer = this.VisitPropertySymbol(node.Indexer); 12120ImmutableArray<PropertySymbol> originalIndexersOpt = this.VisitSymbols<PropertySymbol>(node.OriginalIndexersOpt); 12146ImmutableArray<PropertySymbol> applicableIndexers = this.VisitSymbols<PropertySymbol>(node.ApplicableIndexers); 12425PropertySymbol property = GetUpdatedSymbol(node, node.Property); 13140PropertySymbol? isCompleted = GetUpdatedSymbol(node, node.IsCompleted); 13875PropertySymbol property = GetUpdatedSymbol(node, node.Property); 13882PropertySymbol property = GetUpdatedSymbol(node, node.Property); 14098ImmutableArray<PropertySymbol> properties = GetUpdatedArray(node, node.Properties); 14475PropertySymbol property = GetUpdatedSymbol(node, node.Property); 14635PropertySymbol propertySymbol = GetUpdatedSymbol(node, node.PropertySymbol); 14671PropertySymbol indexer = GetUpdatedSymbol(node, node.Indexer); 14672ImmutableArray<PropertySymbol> originalIndexersOpt = GetUpdatedArray(node, node.OriginalIndexersOpt); 14709ImmutableArray<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 (4)
132var isCompleted = VisitPropertySymbol(node.IsCompleted); 174public override PropertySymbol? VisitPropertySymbol(PropertySymbol? property) 186return ((PropertySymbol)property.OriginalDefinition)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
916return _bound.MethodInfo(((PropertySymbol)symbol).GetOwnOrInheritedSetMethod(), _bound.WellKnownType(WellKnownType.System_Reflection_MethodInfo)); 931return _bound.MethodInfo(((PropertySymbol)symbol).GetOwnOrInheritedGetMethod(), _bound.WellKnownType(WellKnownType.System_Reflection_MethodInfo));
Lowering\DiagnosticsPass_ExpressionTrees.cs (5)
306PropertySymbol propertyAccess, 467if (node.MemberSymbol is PropertySymbol property) 565var indexer = node.Indexer; 575private void CheckRefReturningPropertyAccess(BoundNode node, PropertySymbol property) 585var property = node.PropertySymbol;
Lowering\ExtensionMethodBodyRewriter.cs (2)
196public override PropertySymbol? VisitPropertySymbol(PropertySymbol? symbol)
Lowering\ExtensionMethodReferenceRewriter.cs (2)
241public 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)
184PropertySymbol property = propertyAccess.PropertySymbol; 204PropertySymbol indexer = indexerAccess.Indexer; 270PropertySymbol property,
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
116private void EmbedIfNeedTo(BoundExpression receiver, ImmutableArray<PropertySymbol> properties, SyntaxNode syntaxNode) 127foreach (var p in properties)
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
383PropertySymbol indexer = indexerAccess.Indexer;
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
268PropertySymbol? invocationListProperty;
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (2)
78PropertySymbol indexer = node.Indexer; 104PropertySymbol indexer,
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
714var 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 (6)
91var rewrittenPropertySymbol = VisitPropertySymbol(node.PropertySymbol); 353private new PropertySymbol? VisitPropertySymbol(PropertySymbol? property) 363return ((PropertySymbol)property.OriginalDefinition) 380return (PropertySymbol)member; 409member = VisitPropertySymbol((PropertySymbol)member);
Lowering\StateMachineRewriter\StateMachineRewriter.cs (2)
386var currentManagedThreadIdProperty = (PropertySymbol)F.WellKnownMember(WellKnownMember.System_Environment__CurrentManagedThreadId, isOptional: true);
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.cs (2)
28PropertySymbol associatedProperty, 115PropertySymbol associatedProperty,
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (3)
91private PropertySymbol ImplementedProperty 95return (PropertySymbol)_getter.ExplicitInterfaceImplementations[0].AssociatedSymbol; 99public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations
Lowering\SyntheticBoundNodeFactory.cs (7)
266var propertySym = (PropertySymbol)WellKnownMember(member); 268receiverOpt.Type.GetMembers(propertySym.Name).OfType<PropertySymbol>().Single() == propertySym); 273public BoundExpression Property(BoundExpression? receiverOpt, PropertySymbol property) 288public BoundExpression Indexer(BoundExpression? receiverOpt, PropertySymbol property, BoundExpression arg0) 411public PropertySymbol SpecialProperty(SpecialMember sm) 413return (PropertySymbol)SpecialMember(sm);
Operations\CSharpOperationFactory.cs (5)
626PropertySymbol property = boundIndexerAccess.Indexer; 877var property = (PropertySymbol)memberSymbol; 1903((PropertySymbol)enumeratorInfoOpt.CurrentPropertyGetter.AssociatedSymbol).GetPublicSymbol(), 2905case 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)
44internal 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)
161public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 163get { 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)
245internal static Symbol? GetRuntimeMember(NamedTypeSymbol declaringType, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 251internal static Symbol? GetRuntimeMember(ImmutableArray<Symbol> members, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 330PropertySymbol property = (PropertySymbol)member; 1061internal class SpecialMembersSignatureComparer : SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> 1090protected override TypeSymbol GetPropertyType(PropertySymbol property) 1136protected override ImmutableArray<ParameterSymbol> GetParameters(PropertySymbol property) 1180protected override bool IsByRefProperty(PropertySymbol property)
Symbols\ErrorPropertySymbol.cs (2)
92public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations { get { return ImmutableArray<PropertySymbol>.Empty; } }
Symbols\MemberSymbolExtensions.cs (24)
42return ((PropertySymbol)member).Parameters; 60return ((PropertySymbol)member).ParameterTypesWithAnnotations; 100internal static bool GetIsNewExtensionMember(this PropertySymbol member) 141if (member is PropertySymbol property) 172if (member is PropertySymbol) 228if (member is PropertySymbol property) 294else if (member is PropertySymbol property) 299return (PropertySymbol?)SourceNamedTypeSymbol.GetCompatibleSubstitutedMember(compilation, property, receiverType); 324return ((PropertySymbol)member).ParameterRefKinds; 339return ((PropertySymbol)member).ParameterCount; 368var propertySymbol = (PropertySymbol)symbol; 417return symbol.Kind == SymbolKind.Property && ((PropertySymbol)symbol).IsIndexer; 422return symbol.Kind == SymbolKind.Property && ((PropertySymbol)symbol).IsIndexedProperty; 468return ((PropertySymbol)m).CustomModifierCount(); 483public static int CustomModifierCount(this PropertySymbol property) 512return ((PropertySymbol)s).AsMember(newOwner); 774return ((PropertySymbol)member).IsExplicitInterfaceImplementation; 852return ((PropertySymbol)member).Type.ContainsTupleNames(); 868return ((PropertySymbol)member).ExplicitInterfaceImplementations.Cast<PropertySymbol, Symbol>(); 883return ((PropertySymbol)member).OverriddenProperty; 900var property = (PropertySymbol)member;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
1351internal override IEnumerable<PropertySymbol> GetPropertiesToEmit() 1353return GetMembers<PropertySymbol>(this.GetMembers(), SymbolKind.Property);
Symbols\Metadata\PE\PEPropertySymbol.cs (7)
483PropertySymbol curr = this; 515PropertySymbol next = curr.OverriddenProperty; 786public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 793return ImmutableArray<PropertySymbol>.Empty; 799var builder = ArrayBuilder<PropertySymbol>.GetInstance(); 801foreach (var prop in propertiesWithImplementedGetters) 809foreach (var prop in propertiesWithImplementedSetters)
Symbols\MethodSymbolExtensions.cs (1)
234method.AssociatedSymbol is PropertySymbol { HasUnscopedRefAttribute: true };
Symbols\NamedTypeSymbol.cs (7)
299public ImmutableArray<PropertySymbol> Indexers 307return ImmutableArray<PropertySymbol>.Empty; 312ArrayBuilder<PropertySymbol> indexers = ArrayBuilder<PropertySymbol>.GetInstance(); 317Debug.Assert(((PropertySymbol)candidate).IsIndexer); 318indexers.Add((PropertySymbol)candidate); 610if (member is PropertySymbol { ParameterCount: > 0 } prop)
Symbols\NativeIntegerTypeSymbol.cs (4)
122case PropertySymbol underlyingProperty: 467PropertySymbol underlyingProperty, 490public 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 (17)
41public new virtual PropertySymbol OriginalDefinition 169var property = (PropertySymbol)this.GetLeastOverriddenMember(this.ContainingType); 181var property = (PropertySymbol)this.GetLeastOverriddenMember(this.ContainingType); 227public PropertySymbol OverriddenProperty 235return (PropertySymbol)OverriddenOrHiddenMembers.GetOverriddenMember(); 238return (PropertySymbol)OverriddenOrHiddenMembersResult.GetOverriddenMember(this, OriginalDefinition.OverriddenProperty); 264internal PropertySymbol GetLeastOverriddenProperty(NamedTypeSymbol accessingTypeOpt) 267PropertySymbol p = this; 290PropertySymbol overridden = p.OverriddenProperty; 323public abstract ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations { get; } 326internal virtual PropertySymbol? PartialImplementationPart => null; 327internal virtual PropertySymbol? PartialDefinitionPart => null; 380internal PropertySymbol AsMember(NamedTypeSymbol newOwner) 456PropertySymbol 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)
205internal override IEnumerable<PropertySymbol> GetPropertiesToEmit() 207foreach (PropertySymbol p in _underlyingType.GetPropertiesToEmit())
Symbols\Retargeting\RetargetingPropertySymbol.cs (7)
25private ImmutableArray<PropertySymbol> _lazyExplicitInterfaceImplementations; 38public RetargetingPropertySymbol(RetargetingModuleSymbol retargetingModule, PropertySymbol underlyingProperty) 151public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 160default(ImmutableArray<PropertySymbol>)); 166private ImmutableArray<PropertySymbol> RetargetExplicitInterfaceImplementations() 178var builder = ArrayBuilder<PropertySymbol>.GetInstance(); 182var retargeted = this.RetargetingTranslator.Retarget(impls[i], MemberSignatureComparer.RetargetedExplicitImplementationComparer);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (14)
89return new RetargetingPropertySymbol(this, (PropertySymbol)symbol); 924public PropertySymbol Retarget(PropertySymbol property) 929return (PropertySymbol)this.SymbolMap.GetOrAdd(property, _retargetingModule._createRetargetingProperty); 932public PropertySymbol Retarget(PropertySymbol property, IEqualityComparer<PropertySymbol> retargetedPropertyComparer) 1074private PropertySymbol FindPropertyInRetargetedType(PropertySymbol property, NamedTypeSymbol retargetedType, IEqualityComparer<PropertySymbol> retargetedPropertyComparer) 1093ImmutableArray<PropertySymbol>.Empty); 1099var retargetedProperty = (PropertySymbol)retargetedMember; 1364public override Symbol VisitProperty(PropertySymbol symbol, RetargetOptions argument)
Symbols\SignatureOnlyPropertySymbol.cs (3)
28private readonly ImmutableArray<PropertySymbol> _explicitInterfaceImplementations; 38ImmutableArray<PropertySymbol> explicitInterfaceImplementations) 60public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations { get { return _explicitInterfaceImplementations; } }
Symbols\Source\ExplicitInterfaceHelpers.cs (5)
155internal static PropertySymbol FindExplicitlyImplementedProperty( 156this PropertySymbol implementingProperty, 162return (PropertySymbol)FindExplicitlyImplementedMember(implementingProperty, isOperator: false, explicitInterfaceType, interfacePropertyName, explicitInterfaceSpecifierSyntax, diagnostics); 317var propertySymbol = (PropertySymbol)implementedMember;
Symbols\Source\ModifierUtils.cs (2)
522case PropertySymbol { SetMethod: { } method } when !method.IsAsRestrictive(symbol.ContainingType, ref useSiteInfo): 527case PropertySymbol { SetMethod: null }:
Symbols\Source\SourceMemberContainerSymbol.cs (26)
1709else if (member is FieldSymbol { AssociatedSymbol: SourcePropertySymbolBase { PartialDefinitionPart: PropertySymbol definition } implementation } && 2233var indexersBySignature = new Dictionary<PropertySymbol, PropertySymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2245PropertySymbol indexer = (PropertySymbol)symbol; 2295PropertySymbol indexer, 2298Dictionary<PropertySymbol, PropertySymbol> indexersBySignature, 2332if (indexersBySignature.TryGetValue(indexer, out var prevIndexerBySignature)) 2572var propertySymbol = (PropertySymbol)symbol; 4348PropertySymbol propertySymbol, 4433private static Location GetAccessorOrPropertyLocation(PropertySymbol propertySymbol, bool getNotSet) 4452private static bool ParametersMatchPropertyAccessor(PropertySymbol propertySymbol, bool getNotSet, ImmutableArray<ParameterSymbol> methodParams) 4648if (!((PropertySymbol)member).IsIndexer) 4828PropertySymbol? equalityContract = isRecordClass ? addEqualityContract() : null; 4854Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol { GetMethod.IsEffectivelyReadOnly: false })); 4865Debug.Assert(positionalMembers.All(p => p is PropertySymbol or FieldSymbol)); 5117ImmutableArray<PropertySymbol>.Empty); 5141else if (existingMember is PropertySymbol { IsStatic: false, GetMethod: { } } prop 5199MethodSymbol addGetHashCode(PropertySymbol? equalityContract) 5233PropertySymbol addEqualityContract() 5243ImmutableArray<PropertySymbol>.Empty); 5245PropertySymbol equalityContract; 5255equalityContract = (PropertySymbol)existingEqualityContractProperty; 5292MethodSymbol addThisEquals(PropertySymbol? equalityContract)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (12)
571var property = (PropertySymbol)member; 792: ((PropertySymbol)overridingMember).ParameterTypesWithAnnotations; 811PropertySymbol associatedProperty = (PropertySymbol)associatedPropertyOrEvent; 812PropertySymbol overriddenProperty = associatedProperty.OverriddenProperty; 916else if (overriddenMember is PropertySymbol { IsRequired: true } && overridingMember is PropertySymbol { IsRequired: false }) 951checkOverriddenProperty((PropertySymbol)overridingMember, (PropertySymbol)overriddenMember, diagnostics, ref suppressAccessors); 1049void checkOverriddenProperty(PropertySymbol overridingProperty, PropertySymbol overriddenProperty, BindingDiagnosticBag diagnostics, ref bool suppressAccessors)
Symbols\Source\SourceNamedTypeSymbol.cs (2)
1862if (Indexers.FirstOrDefault() is PropertySymbol indexerSymbol) 1887foreach (PropertySymbol indexer in Indexers)
Symbols\Source\SourcePropertyAccessorSymbol.cs (3)
290PropertySymbol associatedProperty = _property; 612PropertySymbol? explicitlyImplementedPropertyOpt = IsExplicitInterfaceImplementation ? _property.ExplicitInterfaceImplementations.FirstOrDefault() : null; 689PropertySymbol? explicitlyImplementedPropertyOpt = _property.ExplicitInterfaceImplementations.FirstOrDefault();
Symbols\Source\SourcePropertySymbol.cs (2)
839internal sealed override PropertySymbol? PartialDefinitionPart => SourcePartialDefinitionPart; 840internal sealed override PropertySymbol? PartialImplementationPart => SourcePartialImplementationPart;
Symbols\Source\SourcePropertySymbolBase.cs (10)
56private ImmutableArray<PropertySymbol> _lazyExplicitInterfaceImplementations; 121_lazyExplicitInterfaceImplementations = ImmutableArray<PropertySymbol>.Empty; 204PropertySymbol? explicitlyImplementedProperty = null; 228PropertySymbol? overriddenOrImplementedProperty; 279ImmutableArray<PropertySymbol>.Empty : 679public sealed override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 912var overriddenProperty = (PropertySymbol)this.GetLeastOverriddenMember(this.ContainingType); 1008PropertySymbol? explicitlyImplementedProperty = ExplicitInterfaceImplementations.FirstOrDefault(); 1185private void CheckExplicitImplementationAccessor(MethodSymbol thisAccessor, MethodSymbol otherAccessor, PropertySymbol explicitlyImplementedProperty, BindingDiagnosticBag diagnostics)
Symbols\SubstitutedNamedTypeSymbol.cs (1)
467internal override IEnumerable<PropertySymbol> GetPropertiesToEmit()
Symbols\SubstitutedParameterSymbol.cs (1)
22internal SubstitutedParameterSymbol(PropertySymbol containingSymbol, TypeMap map, ParameterSymbol originalParameter) :
Symbols\SubstitutedPropertySymbol.cs (5)
19internal SubstitutedPropertySymbol(SubstitutedNamedTypeSymbol containingType, PropertySymbol originalDefinition) 55public override PropertySymbol OriginalDefinition 110private ImmutableArray<PropertySymbol> _lazyExplicitInterfaceImplementations; 114public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations 123default(ImmutableArray<PropertySymbol>));
Symbols\Symbol.cs (5)
659var property = (PropertySymbol)this; 683if (!((PropertySymbol)method.AssociatedSymbol).CanCallMethodsDirectly()) 738return ((PropertySymbol)method.AssociatedSymbol).CanCallMethodsDirectly(); 1664builder.AddValue(((PropertySymbol)this).TypeWithAnnotations);
Symbols\SymbolExtensions.cs (13)
322return ((PropertySymbol)symbol).MustCallMethodsDirectly; 437internal static FlowAnalysisAnnotations GetFlowAnalysisAnnotations(this PropertySymbol property) 467PropertySymbol property => property.GetFlowAnalysisAnnotations(), 492PropertySymbol property = (PropertySymbol)symbol; 535SymbolKind.Property => ((PropertySymbol)symbol).RequiresInstanceReceiver, 562internal static IPropertySymbol? GetPublicSymbol(this PropertySymbol? symbol) 696internal static ImmutableArray<IPropertySymbol> GetPublicSymbols(this ImmutableArray<PropertySymbol> symbols) 801internal static PropertySymbol? GetSymbol(this IPropertySymbol? symbol) 803return symbol.GetSymbol<PropertySymbol>(); 812internal static bool IsRequired(this Symbol symbol) => symbol is FieldSymbol { IsRequired: true } or PropertySymbol { IsRequired: true }; 819Debug.Assert(symbol is MethodSymbol or PropertySymbol); 820return 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), 64((PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IEnumerator_T__Current)).AsMember(iEnumeratorT), 113static void addProperty(ArrayBuilder<Symbol> builder, PropertySymbol property)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (3)
13private readonly PropertySymbol _interfaceProperty; 17PropertySymbol interfaceProperty, 47public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations => ImmutableArray.Create(_interfaceProperty);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (16)
327(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_ICollection__Count)!, 332(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_ICollection__IsSynchronized)!, 337(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_ICollection__SyncRoot)!, 347(PropertySymbol)((MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__get_Item)!).AssociatedSymbol, 353(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__IsFixedSize)!, 358(PropertySymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__IsReadOnly)!, 405((PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IReadOnlyCollection_T__Count)!).AsMember(iReadOnlyCollectionT), 410((PropertySymbol)((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IReadOnlyList_T__get_Item)!).AssociatedSymbol).AsMember(iReadOnlyListT), 416((PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_ICollection_T__Count)!).AsMember(iCollectionT), 421((PropertySymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_ICollection_T__IsReadOnly)!).AsMember(iCollectionT), 451((PropertySymbol)((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IList_T__get_Item)!).AssociatedSymbol).AsMember(iListT), 518var listMember = (PropertySymbol)containingType.GetFieldTypeMember(WellKnownMember.System_Collections_Generic_List_T__Count); 676var listMember = (PropertySymbol)((MethodSymbol)containingType.GetFieldTypeMember(WellKnownMember.System_Collections_Generic_List_T__get_Item)).AssociatedSymbol; 729static 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)
101internal static void VerifyOverridesEqualityContractFromBase(PropertySymbol overriding, BindingDiagnosticBag diagnostics) 116var overridden = overriding.OverriddenProperty;
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (2)
19private readonly PropertySymbol? _equalityContract; 21public SynthesizedRecordEquals(SourceMemberContainerTypeSymbol containingType, PropertySymbol? equalityContract, int memberOffset)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (2)
18private readonly PropertySymbol? _equalityContract; 20public SynthesizedRecordGetHashCode(SourceMemberContainerTypeSymbol containingType, PropertySymbol? equalityContract, int memberOffset)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (6)
202SymbolKind.Property => F.Property(F.This(), (PropertySymbol)member), 255var property = (PropertySymbol)m; 308var property = (PropertySymbol)member; 329private static bool IsPrintableProperty(PropertySymbol property)
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
111public override TypeWithAnnotations TypeWithAnnotations => ((PropertySymbol)((SourcePropertyAccessorSymbol)ContainingSymbol).AssociatedSymbol).TypeWithAnnotations;
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)
1421PropertySymbol interfaceProperty = (PropertySymbol)interfaceMember; 1580correspondingImplementingAccessor = ((PropertySymbol)implementingPropertyOrEvent).GetOwnOrInheritedGetMethod(); 1583correspondingImplementingAccessor = ((PropertySymbol)implementingPropertyOrEvent).GetOwnOrInheritedSetMethod(); 1928var implementingProperty = (PropertySymbol)implementingMember; 1929var implementedProperty = (PropertySymbol)interfaceMember; 2028var property = (PropertySymbol)interfaceMember; 2047hasRefReturnMismatch = ((PropertySymbol)closestMismatch).RefKind != interfaceMemberRefKind; 2428overriddenMember = ((PropertySymbol)member).OverriddenProperty;
Symbols\VarianceSafety.cs (2)
56CheckPropertyVarianceSafety((PropertySymbol)member, diagnostics); 188private static void CheckPropertyVarianceSafety(PropertySymbol property, BindingDiagnosticBag diagnostics)
Symbols\Wrapped\WrappedPropertySymbol.cs (3)
26protected readonly PropertySymbol _underlyingProperty; 28public WrappedPropertySymbol(PropertySymbol underlyingProperty) 34public PropertySymbol UnderlyingProperty
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTupleTest.cs (1)
23907var b = m.OverriddenProperty;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\PartialPropertiesTests.cs (1)
783var implPart = ((SourcePropertySymbol)prop).PartialImplementationPart!;