[ROOT] / doc / toc / ARCCore / Class / PRich

ToString , TryGetP , TryGetV


Fully flexible storage. Can store anything. Typical inherited for entity representations like 'Customer' or 'Order'.

PRich = rich property. Rich in the sense that it can store a wide amount of information, including metadata.

Inherently not thread-safe due to using Dictionary and not ConcurrentDictionary as storage.
See tips about locking in documentation for OutsideLocalReceiver and some practical code in ARCDoc

See PConcurrent for a (somewhat more) thread-safe alternative.
See PExact<TEnumType> for a more memory efficient alternative (typically used to store entities like 'Customer', 'Product', 'Order' and so on).
See PValue<T> for how single property values are stored (without metadata), like customer's 'FirstName' and 'LastName'.

Probably suitable when you want full flexibility about which metadata to store (see PP) and / or want to store child properties.
Most probably the one to use for 'ordinary' entities like 'Customer', 'Product', 'Order' and so on (including the collections of such entities), whereas PValue<T> is often used for single values for these instances (like 'FirstName', 'Price' and so on).

An instance of this class can also be used as the single total in-memory data storage in your application, that is, as the dataStorage parameter to ParseAndStore.


Note that in a 'StandardAgoRapideCode-only application' IKString will be used more as key, and PRich more used as values (instead of more specific IP-subclass instances (like 'Customer')), because the actual types and property keys are not known.
Although their names may be known because they can be announced over the property stream, the definition for those types are unknown (the types are not present in the assemblies constituting the application).

This means that for instance an ArmDB application may not be able to validate all data, or answer the most complex queries (because it lacks the type information and has to operate more on strings).

TODO: Implement storing of this collection to disk at regular intervals.
TOOD: Background: If data are received from StreamProcessor through OutsideLocalReceiver
TOOD: (and read by StreamProcessor at application startup), then un-needed historical data will accumulate
TODO: (for instance if this object stores only the last temperature, but all temperatures are stored to disk).
TODO: Solution: Replace disk storage at regular intervals by serializing this object's data to disk with ToPropertyStream.


ToStringTODO: Decide on what we actually want with ToString for this class.
TryGetPMade virtual 13 Jan 2022. Possibly the same could be done for all other methods here since _properties is Protected anyway.
TryGetVNote that 'normally' this method would be irrelevant for a PRich object because we will usually be an entity object (like 'Customer') not having an intrinsic value ourselves per se (because we will instead be containing a list of values).

Details

Generated 2024-10-13 01:18:27.699 UTC