Table of Contents

Class VBUserDefinedType

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

Represents any User-Defined Type (UDT) structure.

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

Constructors

VBUserDefinedType(Symbol, ImmutableArray<VBTypeMemberSymbol>)

Represents any User-Defined Type (UDT) structure.

public VBUserDefinedType(Symbol Symbol, ImmutableArray<VBTypeMemberSymbol> Members)

Parameters

Symbol Symbol

The symbol associated with this UDT.

Members ImmutableArray<VBTypeMemberSymbol>

The members (fields) of the UDT.

Properties

DefaultValue

Gets the default value for this data type.

public override VBTypedValue DefaultValue { get; }

Property Value

VBTypedValue

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

The members (fields) of the UDT.

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.

Symbol

The symbol associated with this UDT.

public Symbol Symbol { get; init; }

Property Value

Symbol

Methods

Equals(VBUserDefinedType?)

Indicates whether the current object is equal to another object of the same type.

public virtual bool Equals(VBUserDefinedType? other)

Parameters

other VBUserDefinedType

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

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