But, as a consequence, it becomes the indicator programmer's responsibility to add any extra code, as necessary, to handle any complex and/or dynamic properties that need special consideration.
For example, I wrote an expandable property class (in NT7) named TradeTime, and it serializes properly because I coded special routines to make that happen.
private TradeTime TradeHours = new TradeTime();
[XmlIgnore()]
[GridCategory("Time Management")]
[Gui.Design.DisplayName("TradeHours")]
public TradeTime xpTradeHours
{
get { return TradeHours; }
set { TradeHours = value; }
}
[Browsable(false)]
public string gsTradeHours
{
get { return TradeTime.SerializeToString(TradeHours); }
set { TradeHours = TradeTime.SerializeFromString(value, XmlTimeZone); }
}
I added the static methods "SerializeToString/SerializeFromString" to the TradeTime class precisely to handle the conversion to/from a serialized string.
If your expandable class has an property that needs special fix-up, you can do that in the second property's set() method (eg, see my "gsTradeHours") -- it is that set() method that converts from the stored string back to an object of the expandable class.

Comment