[ROOT] / doc / DocFrag / ARCCore.PKHTMLAttribute

KeyValue
AssemblyARCCore
DocFragTypeClass
NamePKHTMLAttribute
NamespaceARCCore
TypePKHTMLAttribute

ClassAttribute

KeyValue
AssemblyNameARCCore
BaseTypesAttribute; BaseAttribute; EnumMemberAttribute; BasePKAttribute
ClassNamespaceARCCore
ClassTypePKHTMLAttribute
CorrespondingEnumTypePKHTMLAttributeP
InterfacesIP; -IEnumerable<IKIP>-; -IEnumerable-

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().

Edit


Generated 2024-12-26 16:41:05.612 UTC