Table of Contents

Class VBClassType

Namespace
RDCore.SDK.Model.Types.Complex
Assembly
RDCore.SDK.dll

Represents a class type that can be consumed by VB code, not necessarily defined in user code.

public record VBClassType : VBType, IEquatable<VBType>, IVBMemberOwnerType, IEquatable<VBClassType>
Inheritance
VBClassType
Implements
Derived
Inherited Members

Constructors

VBClassType(VBClassModuleSymbol, ImmutableArray<VBTypeMemberSymbol>, bool)

Represents a class type that can be consumed by VB code, not necessarily defined in user code.

public VBClassType(VBClassModuleSymbol Symbol, ImmutableArray<VBTypeMemberSymbol> Members, bool IsHidden = false)

Parameters

Symbol VBClassModuleSymbol
Members ImmutableArray<VBTypeMemberSymbol>
IsHidden bool

Properties

DefaultMember

The default member of the class, if any.

public VBTypeMemberSymbol? DefaultMember { get; init; }

Property Value

VBTypeMemberSymbol

Remarks

Controlled by the VB_UserMemId attribute or @DefaultMember annotation.

DefaultValue

Gets the default value for this data type.

public override VBObjectValue DefaultValue { get; }

Property Value

VBObjectValue

Remarks

⚠️ Derived types must back the implementation of this property with a thread-safe private static readonly Lazy<T>. Failure to do so would lock up the static context initialization of the StaticSymbol symbols.

Members

Gets the members of this type.

public ImmutableArray<VBTypeMemberSymbol> Members { get; init; }

Property Value

ImmutableArray<VBTypeMemberSymbol>

Size

The size (in bytes) of a value of this type.

public override int Size { get; }

Property Value

int

Remarks

Determines the length of the allocated memory space for a value of this type.

Supertypes

An array of class types that this class directly inherits from, including interfaces.

public VBType[] Supertypes { get; init; }

Property Value

VBType[]

Remarks

Controlled by Implements instructions for user code.

Symbol

public VBClassModuleSymbol Symbol { get; init; }

Property Value

VBClassModuleSymbol

Methods

WithMembers(IEnumerable<VBTypeMemberSymbol>)

Gets a copy of this type with the specified members.

public IVBMemberOwnerType WithMembers(IEnumerable<VBTypeMemberSymbol> members)

Parameters

members IEnumerable<VBTypeMemberSymbol>

The members of the new type.

Returns

IVBMemberOwnerType