Table of Contents

Class BoundMember

Namespace
RDCore.SDK.Semantics.Binding
Assembly
RDCore.SDK.dll

A member of an object whose declared type is a class (MS-VBAL §5.6.12), read - c.Value - or called with the arguments written after it (§5.6.13) - c.Add 1, c.Item(1): a Sub, a Function or a Property Get of the class.

public sealed record BoundMember : BoundNode, IEquatable<BoundNode>, IEquatable<BoundMember>
Inheritance
BoundMember
Implements
Inherited Members

Remarks

The binding is the resolution of the member in the class the owner is declared as, made once. The object the owner holds at run time is an instance of that class, or of a class that implements it as an interface (§5.3.1.9), whose member is then the one implementing it: which one is a fact of the object's class, decided once for each class the expression meets. A member that is a public variable of the class, a member of an object declared Object or Variant is late-bound, and a field of a user-defined type is the record's: neither has a member to resolve, and only the owner is bound (DeclaredClass and Member are null) - the member is found by name, from the value, each time, as a member is found late-bound.

Constructors

BoundMember(ExpressionNode, MemberAccessExpressionNode, BoundNode?, VBClassModuleSymbol?, VBTypeMemberSymbol?, IndexExpressionNode?, ImmutableArray<BoundArgument>?)

A member of an object whose declared type is a class (MS-VBAL §5.6.12), read - c.Value - or called with the arguments written after it (§5.6.13) - c.Add 1, c.Item(1): a Sub, a Function or a Property Get of the class.

public BoundMember(ExpressionNode Expression, MemberAccessExpressionNode Access, BoundNode? Owner, VBClassModuleSymbol? DeclaredClass, VBTypeMemberSymbol? Member, IndexExpressionNode? Arguments, ImmutableArray<BoundArgument>? BoundArguments = null)

Parameters

Expression ExpressionNode

The expression: the member access, or the index expression that calls it.

Access MemberAccessExpressionNode

The member access.

Owner BoundNode

The object the member is accessed on, bound; null for a member written with no object before the dot, which is a member of the target of the enclosing With block (MS-VBAL §5.6.15).

DeclaredClass VBClassModuleSymbol

The class the owner is declared as; null for an owner that is late-bound or a record.

Member VBTypeMemberSymbol

The member of DeclaredClass the name resolves to; null when there is no class.

Arguments IndexExpressionNode

The arguments of a call; null for a member that is read, with no argument list.

BoundArguments ImmutableArray<BoundArgument>?

The argument of each parameter of Member after its Me, in order (BoundArgument); null for a member that is not resolved, or whose parameters the arguments do not map to.

Remarks

The binding is the resolution of the member in the class the owner is declared as, made once. The object the owner holds at run time is an instance of that class, or of a class that implements it as an interface (§5.3.1.9), whose member is then the one implementing it: which one is a fact of the object's class, decided once for each class the expression meets. A member that is a public variable of the class, a member of an object declared Object or Variant is late-bound, and a field of a user-defined type is the record's: neither has a member to resolve, and only the owner is bound (DeclaredClass and Member are null) - the member is found by name, from the value, each time, as a member is found late-bound.

Properties

Access

The member access.

public MemberAccessExpressionNode Access { get; init; }

Property Value

MemberAccessExpressionNode

Arguments

The arguments of a call; null for a member that is read, with no argument list.

public IndexExpressionNode? Arguments { get; init; }

Property Value

IndexExpressionNode

BoundArguments

The argument of each parameter of Member after its Me, in order (BoundArgument); null for a member that is not resolved, or whose parameters the arguments do not map to.

public ImmutableArray<BoundArgument>? BoundArguments { get; init; }

Property Value

ImmutableArray<BoundArgument>?

DeclaredClass

The class the owner is declared as; null for an owner that is late-bound or a record.

public VBClassModuleSymbol? DeclaredClass { get; init; }

Property Value

VBClassModuleSymbol

IsLateBound

Whether the owner is declared Object or Variant: what a member reached late-bound returns is a Variant, whatever the member declares (MS-VBAL §5.6.12). An Integer property read through a Variant is a Variant holding the Integer, whose arithmetic widens where an Integer's overflows (MS-VBA, recorded in Excel: oracle\s46 F11).

public bool IsLateBound { get; init; }

Property Value

bool

Member

The member of DeclaredClass the name resolves to; null when there is no class.

public VBTypeMemberSymbol? Member { get; init; }

Property Value

VBTypeMemberSymbol

Owner

The object the member is accessed on, bound; null for a member written with no object before the dot, which is a member of the target of the enclosing With block (MS-VBAL §5.6.15).

public BoundNode? Owner { get; init; }

Property Value

BoundNode