2. Adapting Exchange Items

Skip to end of metadata
Go to start of metadata

Problem

  • Converting IValueSet results to enumerations

Proposal

Additions to Standard
Optional change to Standard

Example

Enumeration
Example of it working
Wrapped LinkableComponent to allow Adaption
Quantity for Reed Growth Enumeration
Adapter to make Reed Growth an enum
Original LinkableComponent with Reed Growth as a double
Reed growth as double Output Exchange Item
Reed Growth as double Quantity
Util to give me a IScalerSet from a double
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. 20-10-2007

    don

    Looks complicated.

    • QuantityAsEnum does not say anything about enum except returning it in ID.
    • It looks like in the above example ExchangeItems being converted and not values.
    • Introducing a new separate type (IExchangeAdapter) will make standard more complicated and does not seem to be very intuitive.

    How I'd expect it to be used when it is necessary to convert values and not exchange items. For example to convert values from exchange item containing value as a string to value in exchange item wrapping enum-type values: