[ROOT] / doc / toc / ARCCore / Class / PKHTMLAttribute
Encode , Encoder , Initialize , IsDefault , TryRemoveP
Contains pointer to HTML encoder for a property.
The encoder replaces any standard mechanism used for HTML encoding a single property.
It is useful for instance for showing images, where the property value can be for instance a Base64-encoding of the binary data which the encoder converts into an HTML <IMG> tag.
Used in ARCCore by class Extensions method ToHTMLSimpleAsTableRow.
Used in ARCQuery by class -QueryProgressDetails- method ToHTMLSimpleSingle.
This attribute can be used in two distinct manners:
1) Manually in C#, that is, at TaggingOfPropertyKeys like:
[PKHtml(Encoder = typeof(PictureEncoder))]
Picture,
for a specific property called 'Picture'.
or
2) Use a class implementing ITypeDescriber which through the EnrichKey-principle in that interface, supplies this attribute (PKHTMLAttribute) with the necessary encoder.
In this manner (with a class called 'Picture', you only have to write:
[PKType(type=typeof(Picture))]
Picture,
Note: In the last case, the class 'Picture' also have to set ValidatorAndParser and implement ToString().
Encode | Encodes the given string to HTML format through the static method implemented in class Encoder. |
Encoder | See Encoder. |
Initialize | To be overridden in sub-classes, but do note that sub-classes are supposed to call base.Initialize() at end of their own initialization. |
IsDefault | Does not have a corresponding BaseAttributeP since all attributes relevant for querying (for instance in the documentation) will be IsDefault = FALSE anyway. (if we had included it in BaseAttributeP it would just have led to a lot of confusing IsDefault = FALSE key-values showing up.) |
TryRemoveP | Should probably never be used. |
Generated 2025-05-23 01:23:16.810 UTC