Root / Assembly / ARCCore / Class / PropertyStreamLine / _Member / TryStore
|Description||Stores the given PropertyStreamLineParsed in the given storage object.|
This is AgoRapide's main deserialization mechanism (together with TryParse).
The main serialization mechanism is ToPropertyStream
Supposed to be called repeatedly by some mechanism listening to the PropertyStream, resulting in a 'complete' object representation being built up.
That is, turning the very basic PropertyStreamLine format into a more usable object oriented format for in-memory processing of data.
TODO: Build in support for transactions. See for PropertyStream TODO: 'FAQ: Can the property stream format support transactions'
TODO: for an outline about how this can be done.
TODO: Consider having short-cut 'SetML' in IP (SetML = Set multi-level) which just calls this method.
Parses the actual property-value (Value) with help of TryValidateAndParse (if a corresponding PK is found.
Possible fail scenarios are:
1) Creation of hierarchical keys. Call to TrySetP may fail.
Note that in general no validation is done for the keys, so for instance a misspelling of Customer as 'Customr/42/FirstName = John' will be accepted and stored accordingly (unless the actual storage has implemented some restrictions for what keys to accept).
2) The final value parsing (and then only if a PK is found). Call to TryValidateAndParse may fail.
3) The final value setting. Call to TrySetP may fail.
The value is stored by call to TrySetP.
This means that repeated occurrences of the same value will overwrite older ones.
Example, for the following property stream lines:
'Customer/42/FirstName = John'
'...' (some other property stream lines)
'Customer/42/FirstName = Johnny'
the final value of Customer/42/FirstName will be 'Johnny'.
Note that the parsing concept is inherently not thread-safe and this method should therefore only be called within a single-threaded context (see SingleThreadedCode).
|MethodSignature||Boolean TryStore(ARCCore.IP, ARCCore.PropertyStreamLineParsed, System.String ByRef)|
Generated 2020-10-13 11:11:05.161 UTC