45 references to AccessorKind
Microsoft.CodeAnalysis.CSharp (45)
Binder\Binder.ValueChecks.cs (17)
76internal static MethodInfo Create(PropertySymbol property, AccessorKind accessorKind) => 79AccessorKind.Get => new MethodInfo(property, property.GetOwnOrInheritedGetMethod(), setMethod: null), 80AccessorKind.Set => new MethodInfo(property, property.GetOwnOrInheritedSetMethod(), setMethod: null), 81AccessorKind.Both => new MethodInfo(property, property.GetOwnOrInheritedGetMethod(), property.GetOwnOrInheritedSetMethod()), 384private static AccessorKind GetIndexerAccessorKind(BoundIndexerAccess indexerAccess, BindValueKind valueKind) 388return AccessorKind.Get; 394private static AccessorKind GetAccessorKind(BindValueKind valueKind) 399BindValueKind.CompoundAssignment => AccessorKind.Both, 400BindValueKind.Assignable => AccessorKind.Set, 401_ => AccessorKind.Get, 408AccessorKind accessorKind = GetIndexerAccessorKind(indexerAccess, valueKind); 562var kind = GetIndexerAccessorKind(indexerAccess, valueKind); 1752if (!AccessingAutoPropertyFromConstructor(receiver, propertySymbol, containing, AccessorKind.Set) 4646Debug.Assert(expr.AccessorKind != AccessorKind.Unknown); 4698var accessorKind = property.RefKind == RefKind.None ? AccessorKind.Set : AccessorKind.Get;
Binder\Binder_Attributes.cs (1)
581lvalue = new BoundPropertyAccess(nameSyntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, propertySymbol, autoPropertyAccessorKind: AccessorKind.Unknown, resultKind, namedArgumentType);
Binder\Binder_Expressions.cs (4)
5863AccessorKind accessorKind = AccessorKind.Unknown; 8687return new BoundPropertyAccess(node, receiver, initialBindingReceiverIsSubjectToCloning: ReceiverIsSubjectToCloning(receiver, propertySymbol), propertySymbol, autoPropertyAccessorKind: AccessorKind.Unknown, lookupResult, propertySymbol.Type, hasErrors: (hasErrors || hasError)); 9870AccessorKind.Unknown,
Binder\Binder_Patterns.cs (1)
366lengthAccess = new BoundPropertyAccess(node, receiverPlaceholder, initialBindingReceiverIsSubjectToCloning: ThreeState.False, lengthProperty, autoPropertyAccessorKind: AccessorKind.Unknown, LookupResultKind.Viable, lengthProperty.Type) { WasCompilerGenerated = true };
Binder\Binder_Statements.cs (2)
1761private static bool AccessingAutoPropertyFromConstructor(BoundExpression? receiver, PropertySymbol propertySymbol, Symbol fromMember, AccessorKind accessorKind) 1771sourceProperty.CanUseBackingFieldDirectlyInConstructor(useAsLvalue: accessorKind != AccessorKind.Get) &&
BoundTree\BoundExpression.cs (1)
353public BoundIndexerAccess Update(AccessorKind accessorKind)
BoundTree\Constructors.cs (3)
283accessorKind: AccessorKind.Unknown, 299AccessorKind accessorKind, 314AccessorKind accessorKind,
Generated\BoundNodes.xml.Generated.cs (9)
6743public BoundObjectInitializerMember(SyntaxNode syntax, Symbol? memberSymbol, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, AccessorKind accessorKind, TypeSymbol receiverType, TypeSymbol type, bool hasErrors = false) 6772public AccessorKind AccessorKind { get; } 6778public BoundObjectInitializerMember Update(Symbol? memberSymbol, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, AccessorKind accessorKind, TypeSymbol receiverType, TypeSymbol type) 7337public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7355public AccessorKind AutoPropertyAccessorKind { get; } 7361public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type) 7411public 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) 7440public AccessorKind AccessorKind { get; } 7448public 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)
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (3)
69Debug.Assert(node.AccessorKind != AccessorKind.Unknown); 80Debug.Assert(node.AccessorKind != AccessorKind.Unknown); 81Debug.Assert(isLeftOfAssignment || (node.AccessorKind != AccessorKind.Set));
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (4)
58oldNodeOpt.Update(rewrittenReceiverOpt, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, propertySymbol, autoPropertyAccessorKind: AccessorKind.Unknown, resultKind, type) : 59new BoundPropertyAccess(syntax, rewrittenReceiverOpt, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, propertySymbol, autoPropertyAccessorKind: AccessorKind.Unknown, resultKind, type); 86oldNodeOpt.Update(rewrittenReceiver, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, property, autoPropertyAccessorKind: AccessorKind.Unknown, LookupResultKind.Viable, property.Type) : 87new BoundPropertyAccess(syntax, rewrittenReceiver, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, property, autoPropertyAccessorKind: AccessorKind.Unknown, LookupResultKind.Viable, property.Type);