protected override void buildParaXml(XmlWriter xmlWriter) { xmlWriter.WriteStartElement("pricing"); xmlWriter.WriteElementString("evaluationTime", this.ReferenceDate_.ToString("yyyy-MM-dd")); xmlWriter.WriteElementString("itemCode", this.itemCode_); xmlWriter.WriteElementString("itemType", this.ItemType_); xmlWriter.WriteStartElement("pricingParameter"); PricingParameterViewModel_.buildXml(xmlWriter); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
protected override string calculateImpl() { //this.InstrumentViewModel_.calculate(); string result = StepDownCppDLL.calculationLibCall( this.InstXml_.InnerXml, this.ParaResultXml_.InnerXml); this.ParaResultXml_.LoadXml(result); XmlNode paraNode = ParaResultXml_.SelectSingleNode("parameter"); XmlNode resultNode = ParaResultXml_.SelectSingleNode("result"); PricingParameterViewModel_.setFromXml(paraNode); PricingResultViewModel_.setFromXml(resultNode); return(result); }
protected override void buildParaResultXml(XmlWriter xmlWriter) { PricingParameterViewModel_.buildXml(xmlWriter); PricingResultViewModel_.buildXml(xmlWriter); }