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