Table of Contents

Class EnumMemberValue

Namespace
RDCore.SDK.Model.Symbols.VBProject
Assembly
RDCore.SDK.dll

How the value of a member of a workspace Enum is declared (MS-VBAL §5.2.3.4).

public sealed record EnumMemberValue : IEquatable<EnumMemberValue>
Inheritance
EnumMemberValue
Implements
Inherited Members

Remarks

An <enum-member> that has a <constant-expression> is the value of that expression Let-coerced to Long. One that has none is 0 when it is the first of its <enum-member-list>, and otherwise 1 greater than the member before it. Every member is therefore the nearest expression at or before it plus the number of members between them, or that number alone when no member before it has an expression - which is what this carries, so that a member's value needs nothing but its own symbol to be determined.

Constructors

EnumMemberValue(ExpressionNode?, int)

How the value of a member of a workspace Enum is declared (MS-VBAL §5.2.3.4).

public EnumMemberValue(ExpressionNode? BaseValue, int Offset)

Parameters

BaseValue ExpressionNode

The <constant-expression> of this member, or of the nearest member before it that has one; null when neither has one.

Offset int

How many members after the one whose expression is BaseValue this one is: 0 for a member that has an expression of its own. When BaseValue is null, the member's position in its list, counting from 0, which is its value.

Remarks

An <enum-member> that has a <constant-expression> is the value of that expression Let-coerced to Long. One that has none is 0 when it is the first of its <enum-member-list>, and otherwise 1 greater than the member before it. Every member is therefore the nearest expression at or before it plus the number of members between them, or that number alone when no member before it has an expression - which is what this carries, so that a member's value needs nothing but its own symbol to be determined.

Properties

BaseValue

The <constant-expression> of this member, or of the nearest member before it that has one; null when neither has one.

public ExpressionNode? BaseValue { get; init; }

Property Value

ExpressionNode

Offset

How many members after the one whose expression is BaseValue this one is: 0 for a member that has an expression of its own. When BaseValue is null, the member's position in its list, counting from 0, which is its value.

public int Offset { get; init; }

Property Value

int