[ROOT] / doc / toc / ARAdventureWorksOLAP / Enum / DimSalesTerritoryP / Image / __TOCDet / Attribute

PK

Attribute

Image

KeyValue
DescriptionCalled 'SalesTerritoryImage' in original sample database
PKHTMLAttributeContains 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().


Encoder, EnumMember, EnumType
PKTypeAttributeCalled 'SalesTerritoryImage' in original sample database

BoilerplateCodeProperties, Cardinality, Description, EnumMember, EnumType, IsObligatory, Type

3 items

Edit


Generated 2024-05-18 15:38:34.320 UTC