Root / Assembly / ARCCore / Class / IP



_MemberAddP, AddPV, AllIPDerivedTypes, AllIPDerivedTypesDict, AllIPDerivedTypesDictIKType, AllIPDerivedTypesInludingGenericAndAbstract, AssertIntegrity, Boolean TryGetP(ARCCore.IK, ARCCore.IP ByRef), Boolean TryGetP(ARCCore.IK, ARCCore.IP ByRef, System.String ByRef), Boolean TryGetV[T](T ByRef), Boolean TryGetV[T](T ByRef, System.String ByRef), Dec, DeepCopy, EnumeratorReturnsEmptyCollection, GetP, GetValueForJSONSerializer, HandleException, Inc, Initialize, IsValid, Item, Keys, Log, LogContext, LogExecuteTime, OnTrySetP, T GetOrAddPV[T](ARCCore.IK, System.Func`1[T]), T GetOrAddPV[T](ARCCore.IK, T), T GetOrAddPV[TKey,T](TKey, System.Func`1[T]), T GetOrAddPV[TKey,T](TKey, T), T GetPV[T](System.Object), ToJSONSerializeable, ToPropertyStream, ToString, TryAssertIntegrity, TryGetPV, TrySetP, TValue GetPV[TKey,TValue](TKey, TValue), Values, Void AddOrUpdateP(ARCCore.IK, ARCCore.IP), Void AddOrUpdateP[TKey](TKey, ARCCore.IP), Void SetLogContext(System.Collections.Generic.List`1[ARCCore.IK], System.Action`1[System.String]), Void SetLogContext(System.String, System.Action`1[System.String])
43 items
DescriptionIP = IProperty.

Common central mechanism for implementing PropertyAccess.

'Everything' in your application, especially entity objects (like 'Customer', 'Order' and so on) should implement this interface.

You should also let internal parts of your application implement this interface. This will make logging and debugging much easier for instance (see ExposingApplicationState).

Some of the implementing classes are:
PRich Fully flexible storage. Can store anything. Typical inherited for entity representations like 'Customer' or 'Order'.
PConcurrent A (somewhat) thread-safe alternative to PRich which also supports log.
PValue<T> Single value storage.

NOTE: Some ideas for new classes implementing this interface could be:
1) PRichImmutable, a quasi-immutable class for which you could (after initialization) set a flag stopping further updates to the class.

(The difference between ITypeDescriber and IP is that the former must be stored 'inside' an IP.
In RDBMS-terms a ITypeDescriber is the Field stored within a IP which is the Post.)

The more classes you have implementing this interface, the more classes you have that can participiate in the AgoRapide world with flexible concepts like PropertyStream, TaggingOfPropertyKeys, PropertyAccess, ExposingApplicationState.
The mechanism has been designed to be as flexible as possible. Experience shows that a great variety of objects can with great advantage be represented through this mechanism. That is, not only traditional entities like 'Customer', 'Order' and so on can be represented but also objects like internal parts of your application (classes, enums),
the different methods in an API and even reports and aggregations.

(Even the mechanism for describing this mechanism (PK) is an implementation of it).

HINT: Whenever you are creating a new class in your application, instead of using traditional setters and getters / traditional properties, let class inherit IP and use this mechanism instead.

Using IP from the start makes the rich functionality of AgoRapide available without much work. (You can always build traditional setters and getters and / or traditional property storage on top of that mechanism at a later stage if you so prefer)

Reflecting the fact that instances of this interface often contain a collection of objects, this interface implements the following:
1) Indexing. Enables you to query more 'direct' in C# like for instance 'DataStorage["Customer"]["42"]["FirstName"]'.
2) IEnumerable<IKIP>.
3) The Keys and Values pattern from ordinary .NET Dictionary (see Keys and Values.
This functionality is of course not relevant for value only implementations like PValue<T> but technically implemented nonetheless in all cases in order for any hierarchical structure to be 'probed' from the outside in a standardized manner.

TODO: Implement IDictionary<TKey, TValue> also..

See also PropertyAccess.
Interfaces-System.Collections.Generic.IEnumerable`1[ARCCore.IKIP]-; -System.Collections.IEnumerable-
LongDescriptionTODO: Regarding default interface methods defined here in this interface TODO: and the need for implementing an 'IP' property in implementing classes like IP.
TODO: As AgoRapide matures, considering implementing copies of the default interface methods in a common super class TODO: for PRich, PConcurrent, PExact (not necessary for PValue, PEmpty and not possible for BaseAttribute).

Note how AgoRapide internally uses this same mechanism ('eating its own dog food'), and also how you are encouraged to document your application through attributes like ClassAttribute and ClassMemberAttribute using the same mechanism.

Note about packing of values: PropertyAccess uses packed values (everything is send and received as IP) meaning for instance that a string-value would typically be packed inside a PValue<T> object.
Connected with this, classes implementing IP have a choice between
1) Unpacking on receive, packing on send (like used by PExact<EnumType>) or
2) Storing in packed form (like used by PRich).
The former is more memory efficient (see MemoryConsumption), but less able to store metadata (see PP) and hierarchical data.
(see also PackObjectForStorageInEntityObject and TryGetV.)
See also ITypeDescriber which provides a standardized mechanism for describing single-property values.

6 items

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