Class VBUserDefinedTypeValue
Represents a value of a VBUserDefinedType. Like VBObjectValue the value is a MemoryAddress — a UDT has location identity and is never passed by value.
public record VBUserDefinedTypeValue : VBTypedValue, IEquatable<VBTypedValue>, IVBTypedValue<VBUserDefinedTypeValue, MemoryAddress>, IEquatable<IVBTypedValue<VBUserDefinedTypeValue, MemoryAddress>>, IEquatable<VBUserDefinedTypeValue>
- Inheritance
-
VBUserDefinedTypeValue
- Implements
- Inherited Members
Constructors
VBUserDefinedTypeValue(VBUserDefinedType)
public VBUserDefinedTypeValue(VBUserDefinedType typeInfo)
Parameters
typeInfoVBUserDefinedType
VBUserDefinedTypeValue(IBindingHandle, VBUserDefinedType)
public VBUserDefinedTypeValue(IBindingHandle handle, VBUserDefinedType typeInfo)
Parameters
handleIBindingHandletypeInfoVBUserDefinedType
VBUserDefinedTypeValue(MemoryAddress, VBUserDefinedType)
public VBUserDefinedTypeValue(MemoryAddress reference, VBUserDefinedType typeInfo)
Parameters
referenceMemoryAddresstypeInfoVBUserDefinedType
Properties
Size
The allocated size (in bytes) of this value.
public override int Size { get; }
Property Value
Value
Gets the underlying managed value corresponding to this typed value.
public MemoryAddress Value { get; }
Property Value
Methods
Equals(IVBTypedValue<VBUserDefinedTypeValue, MemoryAddress>?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(IVBTypedValue<VBUserDefinedTypeValue, MemoryAddress>? other)
Parameters
otherIVBTypedValue<VBUserDefinedTypeValue, MemoryAddress>An object to compare with this object.
Returns
TryAllocateIn(ISessionStorage, out VBUserDefinedTypeValue?)
Reserves storage sized for this UDT through storage, and returns a copy of
this value bound to the resulting address — a UDT's identity is its address, so the
allocated copy self-reports the very address it was allocated at.
public bool TryAllocateIn(ISessionStorage storage, out VBUserDefinedTypeValue? allocated)
Parameters
storageISessionStorageallocatedVBUserDefinedTypeValue
Returns
- bool
falseif the underlying memory space is exhausted.