Root / Assembly / ARCCore / Class / PValue<T>

ClassAttribute

PValue<T>

KeyValue
_Member.ctor, ConvertObjectToString, DeepCopy, ToString, TryGetV
AssemblyNameARCCore
ClassType-ARCCore.PValue`1[T]-
DescriptionSingle value storage.

The most memory-efficient 'property'-object to use, when only the actual value of a property is needed.
(unable to store any sub-properties or metadata).

Immutable (assuming generic type is also immutable).

Typically used for storing properties like 'Customer.FirstName', 'Product.Price' and so on.

When metadata is desired, a more complicated approach is used. See Value for a more detailed explanation about this
Using this class should give an overhead per object of 24 bytes (16 for object header, 8 for Value), in addition to the space needed for the actual object (of type T) stored. Note, when calculating space needed for the actual object (of type T) you must remember to include boxing-overhead for value types.

TODO: Consider creating a PValueVal-class for storing value types. This should get rid of boxing...?
TODO: (However, no practical use-case has been seen as of Jul 2020 because of PExact<EnumType> TODO: which stores objects directly within an Object[], that is, not using PValue<T> at all.)

See also MemoryConsumption.
InterfacesARCCore.IP; -System.Collections.Generic.IEnumerable`1[ARCCore.IKIP]-; -System.Collections.IEnumerable-

5 items


Generated 2020-10-13 11:11:05.288 UTC