Root / Assembly / ARCCore / AREnumType / PropertyKeyEnum / ClassAttributeP / _Member / BoilerplateCodePropertiesAndStorage

PK

BoilerplateCodePropertiesAndStorage

KeyValue
DescriptionOnly relevant when implements IP and when a CorrespondingEnumType is found.

Automatically generated boilerplate code that implements storage (and also traditional setters and getters) for properties of this class.

In it simplest form this entails code similar to:

public string Name {
get => IP.GetPV<string>(AppleP.Name);
set => IP.SetPV(AppleP.Name, value);
}

Paste this code into your class if you find the default IP implementations too memory hungry (see MemoryConsumption).

The code provided through this property will also eliminate the performance impact due to the complicated PropertyAccess mechanism.

Background: The typical IP implementations are a bit memory hungry due the generic mechanism used. This can be alleviated by implementing traditional object storage, that is, by dispensing of the typical Dictionary<IK, IP> Properties collection like the one used in PRich, and just implement IP on top of such a traditional structure.
You can do this as needed for a few select 'entity' classes as your application grows (that is, for the classes for which you see a huge number of instances consuming excessive memory).
(ARCDoc gives some examples of this).

The practical result of using this code is that your class turns into a quite traditional C# class regarding property access and memory usage, but you still retain the general PropertyStream compatibility (serialization / deserialization to / from the property stream).(Note however, that you do NOT retain the possibility for storing neta-information for a property, like who created it or how old it is (see PP like Cid and Created).

LongDescriptionTODO: Not implemented as of May 2020.

Note that in order to get all the rich functionality of PropertyAccess a quite large number of methods have to be implemented.

Automatically inserted by GetAttribute.

See also BoilerplateCodeProperties.
PKTypeAttributeOnly relevant when implements IP and when a CorrespondingEnumType is found.

Automatically generated boilerplate code that implements storage (and also traditional setters and getters) for properties of this class.

In it simplest form this entails code similar to:

public string Name {
get => IP.GetPV<string>(AppleP.Name);
set => IP.SetPV(AppleP.Name, value);
}

Paste this code into your class if you find the default IP implementations too memory hungry (see MemoryConsumption).

The code provided through this property will also eliminate the performance impact due to the complicated PropertyAccess mechanism.

Background: The typical IP implementations are a bit memory hungry due the generic mechanism used. This can be alleviated by implementing traditional object storage, that is, by dispensing of the typical Dictionary<IK, IP> Properties collection like the one used in PRich, and just implement IP on top of such a traditional structure.
You can do this as needed for a few select 'entity' classes as your application grows (that is, for the classes for which you see a huge number of instances consuming excessive memory).
(ARCDoc gives some examples of this).

The practical result of using this code is that your class turns into a quite traditional C# class regarding property access and memory usage, but you still retain the general PropertyStream compatibility (serialization / deserialization to / from the property stream).(Note however, that you do NOT retain the possibility for storing neta-information for a property, like who created it or how old it is (see PP like Cid and Created).



Cardinality, Description, EnumMember, EnumType, IsObligatory, LongDescription, Type

3 items


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