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()),
361
private static
AccessorKind
GetIndexerAccessorKind(BoundIndexerAccess indexerAccess, BindValueKind valueKind)
365
return
AccessorKind
.Get;
371
private static
AccessorKind
GetAccessorKind(BindValueKind valueKind)
376
BindValueKind.CompoundAssignment =>
AccessorKind
.Both,
377
BindValueKind.Assignable =>
AccessorKind
.Set,
378
_ =>
AccessorKind
.Get,
385
AccessorKind
accessorKind = GetIndexerAccessorKind(indexerAccess, valueKind);
539
var
kind = GetIndexerAccessorKind(indexerAccess, valueKind);
1729
if (!AccessingAutoPropertyFromConstructor(receiver, propertySymbol, containing,
AccessorKind
.Set)
4628
Debug.Assert(expr.AccessorKind !=
AccessorKind
.Unknown);
4680
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)
5898
AccessorKind
accessorKind =
AccessorKind
.Unknown;
8720
return new BoundPropertyAccess(node, receiver, initialBindingReceiverIsSubjectToCloning: ReceiverIsSubjectToCloning(receiver, propertySymbol), propertySymbol, autoPropertyAccessorKind:
AccessorKind
.Unknown, lookupResult, propertySymbol.Type, hasErrors: (hasErrors || hasError));
9903
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)
1774
private static bool AccessingAutoPropertyFromConstructor(BoundExpression? receiver, PropertySymbol propertySymbol, Symbol fromMember,
AccessorKind
accessorKind)
1784
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)
6744
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)
6773
public
AccessorKind
AccessorKind { get; }
6779
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)
7338
public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol,
AccessorKind
autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false)
7356
public
AccessorKind
AutoPropertyAccessorKind { get; }
7362
public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol,
AccessorKind
autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type)
7412
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)
7441
public
AccessorKind
AccessorKind { get; }
7449
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);