Class VBClassType
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
SymbolVBClassModuleSymbolMembersImmutableArray<VBTypeMemberSymbol>IsHiddenbool
Properties
DefaultMember
The default member of the class, if any.
public VBTypeMemberSymbol? DefaultMember { get; init; }
Property Value
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
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
Size
The size (in bytes) of a value of this type.
public override int Size { get; }
Property Value
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
Methods
WithMembers(IEnumerable<VBTypeMemberSymbol>)
Gets a copy of this type with the specified members.
public IVBMemberOwnerType WithMembers(IEnumerable<VBTypeMemberSymbol> members)
Parameters
membersIEnumerable<VBTypeMemberSymbol>The members of the new type.