public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multi_rangeND serial_Excel_multi_rangeND = serial_Class as FpmlSerializedCSharp.Excel_multi_rangeND; this.joint_type_ = serial_Excel_multi_rangeND.Joint_type_.ValueStr; List <FpmlSerializedCSharp.Range1D> serial_range1D = serial_Excel_multi_rangeND.Range1D_; this.range1DViewModel_ = new ObservableCollection <Range1DViewModel>(); foreach (var item in serial_range1D) { string type = item.Excel_type_.ValueStr; Range1DViewModel viewModel = Range1DViewModel.CreateRange1D(type); viewModel.setFromSerial(item); this.range1DViewModel_.Add(viewModel); } List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multi_rangeND.Excel_underlyingCalcID_; this.excel_underlyingCalcIDViewModel_ = new ObservableCollection <Excel_underlyingCalcIDViewModel>(); foreach (var item in serial_excel_underlyingCalcID) { string type = item.Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(type); viewModel.setFromSerial(item); this.excel_underlyingCalcIDViewModel_.Add(viewModel); } }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_couponSchedule serial_Excel_couponSchedule = serial_Class as FpmlSerializedCSharp.Excel_couponSchedule; FpmlSerializedCSharp.Excel_multiCondi_structuredAccrualCouponSchedule serial_Excel_multiCondi_structuredAccrualCouponSchedule = serial_Excel_couponSchedule.Excel_multiCondi_structuredAccrualCouponSchedule_; this.eventDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.EventDate_.ValueStr); this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.PayoffDate_.ValueStr); this.calculationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.CalculationStartDate_.ValueStr); this.calculationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.CalculationEndDate_.ValueStr); this.description_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Description_.ValueStr; this.vba_description_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Vba_description_.ValueStr; List <FpmlSerializedCSharp.Range1D> serial_range1D = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Range1D_; this.range1DViewModel_ = new ObservableCollection <Range1DViewModel>(); foreach (var item in serial_range1D) { string type = item.Excel_type_.ValueStr; Range1DViewModel viewModel = Range1DViewModel.CreateRange1D(type); viewModel.setFromSerial(item); this.range1DViewModel_.Add(viewModel); } List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Excel_underlyingCalcID_; this.excel_underlyingCalcIDViewModel_ = new ObservableCollection <Excel_underlyingCalcIDViewModel>(); foreach (var item in serial_excel_underlyingCalcID) { string type = item.Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(type); viewModel.setFromSerial(item); this.excel_underlyingCalcIDViewModel_.Add(viewModel); } List <FpmlSerializedCSharp.Excel_returnCalcInfo> serial_excel_returnCalcInfo = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Excel_returnCalcInfo_; this.excel_returnCalcInfoViewModel_ = new ObservableCollection <Excel_returnCalcInfoViewModel>(); foreach (var item in serial_excel_returnCalcInfo) { string type = item.Excel_type_.ValueStr; Excel_returnCalcInfoViewModel viewModel = Excel_returnCalcInfoViewModel.CreateExcel_returnCalcInfo(type); viewModel.setFromSerial(item); this.excel_returnCalcInfoViewModel_.Add(viewModel); } this.dayCounter_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.DayCounter_.ValueStr; this.detailScheduleType_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.DetailScheduleType_.ValueStr; }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype serial_Excel_multiAsset_compositeOption_subtype = serial_Class as FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype; FpmlSerializedCSharp.Excel_multiAsset_upInOutCall serial_Excel_multiAsset_upInOutCall = serial_Excel_multiAsset_compositeOption_subtype.Excel_multiAsset_upInOutCall_; this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.PayoffDate_.ValueStr); this.exerciseDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ExerciseDate_.ValueStr); this.inOut_ = serial_Excel_multiAsset_upInOutCall.InOut_.ValueStr; this.baseUnderlyingValue_ = serial_Excel_multiAsset_upInOutCall.BaseUnderlyingValue_.ValueStr; this.baseCoupon_ = serial_Excel_multiAsset_upInOutCall.BaseCoupon_.ValueStr; this.strike_ = serial_Excel_multiAsset_upInOutCall.Strike_.ValueStr; this.strikeValue_ = serial_Excel_multiAsset_upInOutCall.StrikeValue_.ValueStr; this.partiRate_ = serial_Excel_multiAsset_upInOutCall.PartiRate_.ValueStr; this.barrier_ = serial_Excel_multiAsset_upInOutCall.Barrier_.ValueStr; this.barrierValue_ = serial_Excel_multiAsset_upInOutCall.BarrierValue_.ValueStr; this.rebateCoupon_ = serial_Excel_multiAsset_upInOutCall.RebateCoupon_.ValueStr; this.rebateCouponValue_ = serial_Excel_multiAsset_upInOutCall.RebateCouponValue_.ValueStr; List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multiAsset_upInOutCall.Excel_underlyingCalcID_; this.excel_underlyingCalcIDViewModel_ = new ObservableCollection <Excel_underlyingCalcIDViewModel>(); foreach (var item in serial_excel_underlyingCalcID) { string type = item.Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(type); viewModel.setFromSerial(item); this.excel_underlyingCalcIDViewModel_.Add(viewModel); } this.observationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationStartDate_.ValueStr); this.observationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationEndDate_.ValueStr); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype serial_Excel_multiAsset_compositeOption_subtype = serial_Class as FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype; FpmlSerializedCSharp.Excel_multiAsset_upInOutCall serial_Excel_multiAsset_upInOutCall = serial_Excel_multiAsset_compositeOption_subtype.Excel_multiAsset_upInOutCall_; this.inOut_ = Enum.Parse(typeof(InOutEnum), serial_Excel_multiAsset_upInOutCall.InOut_.ValueStr) as InOutEnum?; this.exerciseDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ExerciseDate_.ValueStr); //this.baseUnderlyingValue_ = serial_Excel_multiAsset_upInOutCall.BaseUnderlyingValue_.DoubleValue(); this.baseCoupon_ = (serial_Excel_multiAsset_upInOutCall.BaseCoupon_.DoubleValue() * 100.0).ToString(); this.strike_ = (serial_Excel_multiAsset_upInOutCall.Strike_.DoubleValue() * 100.0).ToString(); //this.strikeValue_ = serial_Excel_multiAsset_upInOutCall.StrikeValue_.ValueStr; this.partiRate_ = (serial_Excel_multiAsset_upInOutCall.PartiRate_.DoubleValue() * 100.0).ToString(); this.barrier_ = (serial_Excel_multiAsset_upInOutCall.Barrier_.DoubleValue() * 100.0).ToString(); //this.barrierValue_ = serial_Excel_multiAsset_upInOutCall.BarrierValue_.ValueStr; this.rebateCoupon_ = (serial_Excel_multiAsset_upInOutCall.RebateCoupon_.DoubleValue() * 100.0).ToString(); this.rebateCouponValue_ = serial_Excel_multiAsset_upInOutCall.RebateCouponValue_.ValueStr; List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multiAsset_upInOutCall.Excel_underlyingCalcID_; //this.excel_underlyingCalcIDViewModel_ = new ObservableCollection<Excel_underlyingCalcIDViewModel>(); string barrierType = serial_excel_underlyingCalcID[0].Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel barrier_viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(barrierType); barrier_viewModel.setFromSerial(serial_excel_underlyingCalcID[0]); //this.excel_underlyingCalcIDViewModel_.Add(barrier_viewModel); barrierUnderlyingCalcIDViewModel_ = barrier_viewModel; //returnCalcID string returnType = serial_excel_underlyingCalcID[1].Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel return_viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(returnType); return_viewModel.setFromSerial(serial_excel_underlyingCalcID[1]); //this.excel_underlyingCalcIDViewModel_.Add(return_viewModel); returnUnderlyingCalcIDViewModel_ = return_viewModel; this.observationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationStartDate_.ValueStr); this.observationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationEndDate_.ValueStr); this.descriptionUpdate(); }