public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.ReferenceCurve         serial_ReferenceCurve         = serial_Class as FpmlSerializedCSharp.ReferenceCurve;
            FpmlSerializedCSharp.CdsSpreadTermstructure serial_CdsSpreadTermstructure = serial_ReferenceCurve.CdsSpreadTermstructure_;

            this.type_ = serial_CdsSpreadTermstructure.Type_.ValueStr;

            this.interpolation_ = serial_CdsSpreadTermstructure.Interpolation_.ValueStr;

            this.daycounter_ = serial_CdsSpreadTermstructure.Daycounter_.ValueStr;

            this.calendar_ = serial_CdsSpreadTermstructure.Calendar_.ValueStr;

            this.businessDayConvention_ = serial_CdsSpreadTermstructure.BusinessDayConvention_.ValueStr;

            List <FpmlSerializedCSharp.RateData> serial_rateData = serial_CdsSpreadTermstructure.RateData_;

            this.rateDataViewModel_ = new ObservableCollection <RateDataViewModel>();
            foreach (var item in serial_rateData)
            {
                RateDataViewModel viewModel = new RateDataViewModel();
                viewModel.setFromSerial(item);
                this.rateDataViewModel_.Add(viewModel);
            }

            this.dateGeneration_ = serial_CdsSpreadTermstructure.DateGeneration_.ValueStr;

            this.recoveryRate_ = serial_CdsSpreadTermstructure.RecoveryRate_.ValueStr;

            this.view_             = new CdsSpreadTermstructureView();
            this.view_.DataContext = this;
        }
        private RateDataViewModel rateDataVM(string multiple, string period, string data)
        {
            RateDataViewModel rateDataVM = new RateDataViewModel();

            rateDataVM.PeriodMultiplier_ = multiple;
            rateDataVM.Period_           = period;
            rateDataVM.Data_             = data;

            return(rateDataVM);
        }
        public override void buildXml()
        {

            YieldTermstructureViewModel ytvm = new YieldTermstructureViewModel();
            ytvm.CurveType_ = this.curveType_;
            ytvm.Interpolation_ = this.interpolation_;
            ytvm.Daycounter_ = this.daycounter_;
            ytvm.Calendar_ = this.calendar_;
            ytvm.BusinessDayConvention_ = this.businessDC_;

            for (int i = 0; i < tenorArr_.Length ; i++)
            {
                RateDataViewModel rdvm = new RateDataViewModel();
                rdvm.PeriodMultiplier_ = this.tenorArr_[i].Substring(0,this.tenorArr_[i].Length - 1);
                rdvm.Period_ = this.tenorArr_[i].Substring(this.tenorArr_[i].Length - 1);
                rdvm.Data_ = this.dataArr_[i];

                ytvm.RateDataViewModel_.Add(rdvm);

            }

            this.yieldCurveVM_ = ytvm;
            //ytvm.buildXml();
        }
        private RateDataViewModel rateDataVM(string multiple, string period, string data)
        {
            RateDataViewModel rateDataVM = new RateDataViewModel();

            rateDataVM.PeriodMultiplier_ = multiple;
            rateDataVM.Period_ = period;
            rateDataVM.Data_ = data;

            return rateDataVM;
        }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.YieldTermstructure serial_YieldTermstructure = serial_Class as FpmlSerializedCSharp.YieldTermstructure;
 
     this.type_ = serial_YieldTermstructure.CurveType_.ValueStr;
     //this.curveType_ = serial_YieldTermstructure.c .ValueStr;
     this.interpolation_ = serial_YieldTermstructure.Interpolation_.ValueStr;
     this.daycounter_ = serial_YieldTermstructure.Daycounter_.ValueStr;
     this.calendar_ = serial_YieldTermstructure.Calendar_.ValueStr;
     this.businessDayConvention_ = serial_YieldTermstructure.BusinessDayConvention_.ValueStr;
     
     List<FpmlSerializedCSharp.RateData> serial_rateData = serial_YieldTermstructure.RateData_;
     this.rateDataViewModel_ = new ObservableCollection<RateDataViewModel>();
     foreach (var item in serial_rateData)
     {
         RateDataViewModel viewModel = new RateDataViewModel();
         viewModel.setFromSerial(item);
         this.rateDataViewModel_.Add(viewModel);
     }
     
     this.view_ = new YieldTermstructureView();
     this.view_.DataContext = this;
 }