public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.EventTrigger serial_EventTrigger = serial_Class as FpmlSerializedCSharp.EventTrigger;
            FpmlSerializedCSharp.SimpleRangeAccrualRateTrigger serial_SimpleRangeAccrualRateTrigger = serial_EventTrigger.SimpleRangeAccrualRateTrigger_;

            this.dayCounter_ = serial_SimpleRangeAccrualRateTrigger.DayCounter_.ValueStr;

            this.calculationStartDate_ = StringConverter.xmlDateToDateTime(serial_SimpleRangeAccrualRateTrigger.CalculationStartDate_.ValueStr);

            this.calculationEndDate_ = StringConverter.xmlDateToDateTime(serial_SimpleRangeAccrualRateTrigger.CalculationEndDate_.ValueStr);

            FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_SimpleRangeAccrualRateTrigger.ReferenceCalculationInfo_;
            string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;

            this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
            this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);

            FpmlSerializedCSharp.SimpleRangeEventList serial_simpleRangeEventList = serial_SimpleRangeAccrualRateTrigger.SimpleRangeEventList_;
            string simpleRangeEventListtype = serial_simpleRangeEventList.Excel_type_.ValueStr;

            this.simpleRangeEventListViewModel_ = SimpleRangeEventListViewModel.CreateSimpleRangeEventList(simpleRangeEventListtype);
            this.simpleRangeEventListViewModel_.setFromSerial(serial_simpleRangeEventList);

            FpmlSerializedCSharp.PayoffDateInfo serial_payoffDateInfo = serial_SimpleRangeAccrualRateTrigger.PayoffDateInfo_;
            string payoffDateInfotype = serial_payoffDateInfo.Excel_type_.ValueStr;

            this.payoffDateInfoViewModel_ = PayoffDateInfoViewModel.CreatePayoffDateInfo(payoffDateInfotype);
            this.payoffDateInfoViewModel_.setFromSerial(serial_payoffDateInfo);

            this.denumerDateNum_ = serial_SimpleRangeAccrualRateTrigger.DenumerDateNum_.ValueStr;
        }
Esempio n. 2
0
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.BarrierInfo          serial_BarrierInfo          = serial_Class as FpmlSerializedCSharp.BarrierInfo;
            FpmlSerializedCSharp.ConstDualBarrierInfo serial_ConstDualBarrierInfo = serial_BarrierInfo.ConstDualBarrierInfo_;

            FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_ConstDualBarrierInfo.ReferenceCalculationInfo_;
            string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;

            this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
            this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);

            FpmlSerializedCSharp.BarrierDateInfo serial_barrierDateInfo = serial_ConstDualBarrierInfo.BarrierDateInfo_;
            string barrierDateInfotype = serial_barrierDateInfo.Excel_type_.ValueStr;

            this.barrierDateInfoViewModel_ = BarrierDateInfoViewModel.CreateBarrierDateInfo(barrierDateInfotype);
            this.barrierDateInfoViewModel_.setFromSerial(serial_barrierDateInfo);

            this.upperTrigger_ = serial_ConstDualBarrierInfo.UpperTrigger_.ValueStr;

            this.lowerTrigger_ = serial_ConstDualBarrierInfo.LowerTrigger_.ValueStr;

            this.pastEventOccDate_ = StringConverter.xmlDateToDateTime(serial_ConstDualBarrierInfo.PastEventOccDate_.ValueStr);

            this.pastEventOccValue_ = serial_ConstDualBarrierInfo.PastEventOccValue_.ValueStr;

            this.refVariableFlag_eventOccDate_ = StringConverter.xmlDateToDateTime(serial_ConstDualBarrierInfo.RefVariableFlag_eventOccDate_.ValueStr);

            this.refVariableFlag_eventOccValue_ = serial_ConstDualBarrierInfo.RefVariableFlag_eventOccValue_.ValueStr;
        }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.PayoffInfo serial_PayoffInfo = serial_Class as FpmlSerializedCSharp.PayoffInfo;
            FpmlSerializedCSharp.CompositeSumOptionPayoff serial_CompositeSumOptionPayoff = serial_PayoffInfo.CompositeSumOptionPayoff_;

            FpmlSerializedCSharp.FixingDateInfo serial_fixingDateInfo = serial_CompositeSumOptionPayoff.FixingDateInfo_;
            string fixingDateInfotype = serial_fixingDateInfo.Excel_type_.ValueStr;

            this.fixingDateInfoViewModel_ = FixingDateInfoViewModel.CreateFixingDateInfo(fixingDateInfotype);
            this.fixingDateInfoViewModel_.setFromSerial(serial_fixingDateInfo);

            FpmlSerializedCSharp.PayoffDateInfo serial_payoffDateInfo = serial_CompositeSumOptionPayoff.PayoffDateInfo_;
            string payoffDateInfotype = serial_payoffDateInfo.Excel_type_.ValueStr;

            this.payoffDateInfoViewModel_ = PayoffDateInfoViewModel.CreatePayoffDateInfo(payoffDateInfotype);
            this.payoffDateInfoViewModel_.setFromSerial(serial_payoffDateInfo);

            FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_CompositeSumOptionPayoff.ReferenceCalculationInfo_;
            string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;

            this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
            this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);

            List <FpmlSerializedCSharp.StandardOption> serial_standardOption = serial_CompositeSumOptionPayoff.StandardOption_;

            this.standardOptionViewModel_ = new ObservableCollection <StandardOptionViewModel>();
            foreach (var item in serial_standardOption)
            {
                string type = item.Excel_type_.ValueStr;
                StandardOptionViewModel viewModel = StandardOptionViewModel.CreateStandardOption(type);
                viewModel.setFromSerial(item);
                this.standardOptionViewModel_.Add(viewModel);
            }
        }
Esempio n. 4
0
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.EventCalculation    serial_EventCalculation    = serial_Class as FpmlSerializedCSharp.EventCalculation;
            FpmlSerializedCSharp.SimpleRangeEventCal serial_SimpleRangeEventCal = serial_EventCalculation.SimpleRangeEventCal_;

            FpmlSerializedCSharp.Range1D serial_range1D = serial_SimpleRangeEventCal.Range1D_;
            string range1Dtype = serial_range1D.Excel_type_.ValueStr;

            this.range1DViewModel_ = Range1DViewModel.CreateRange1D(range1Dtype);
            this.range1DViewModel_.setFromSerial(serial_range1D);

            FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_SimpleRangeEventCal.ReferenceCalculationInfo_;
            string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;

            this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
            this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);

            FpmlSerializedCSharp.DateInformation serial_dateInformation = serial_SimpleRangeEventCal.DateInformation_;
            string dateInformationtype = serial_dateInformation.Excel_type_.ValueStr;

            this.dateInformationViewModel_ = DateInformationViewModel.CreateDateInformation(dateInformationtype);
            this.dateInformationViewModel_.setFromSerial(serial_dateInformation);

            FpmlSerializedCSharp.JointSimpleCalculation serial_jointSimpleCalculation = serial_SimpleRangeEventCal.JointSimpleCalculation_;
            string jointSimpleCalculationtype = serial_jointSimpleCalculation.Excel_type_.ValueStr;

            this.jointSimpleCalculationViewModel_ = JointSimpleCalculationViewModel.CreateJointSimpleCalculation(jointSimpleCalculationtype);
            this.jointSimpleCalculationViewModel_.setFromSerial(serial_jointSimpleCalculation);
        }
Esempio n. 5
0
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.EventCalculation     serial_EventCalculation     = serial_Class as FpmlSerializedCSharp.EventCalculation;
            FpmlSerializedCSharp.LowerBarrierEventCal serial_LowerBarrierEventCal = serial_EventCalculation.LowerBarrierEventCal_;

            List <FpmlSerializedCSharp.DateInformation> serial_dateInformation = serial_LowerBarrierEventCal.DateInformation_;

            this.dateInformationViewModel_ = new ObservableCollection <DateInformationViewModel>();
            foreach (var item in serial_dateInformation)
            {
                string type = item.Excel_type_.ValueStr;
                DateInformationViewModel viewModel = DateInformationViewModel.CreateDateInformation(type);
                viewModel.setFromSerial(item);
                this.dateInformationViewModel_.Add(viewModel);
            }

            this.lowerTriggerViewModel_ = new ObservableCollection <LowerTriggerViewModel>();
            foreach (var item in serial_LowerBarrierEventCal.LowerTrigger_)
            {
                this.value_.Add(item.ValueStr);
            }

            FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_LowerBarrierEventCal.ReferenceCalculationInfo_;
            string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;

            this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
            this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
        }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.EventTrigger       serial_EventTrigger       = serial_Class as FpmlSerializedCSharp.EventTrigger;
            FpmlSerializedCSharp.VanillaRateTrigger serial_VanillaRateTrigger = serial_EventTrigger.VanillaRateTrigger_;

            this.dayCounter_ = serial_VanillaRateTrigger.DayCounter_.ValueStr;

            this.calculationStartDate_ = StringConverter.xmlDateToDateTime(serial_VanillaRateTrigger.CalculationStartDate_.ValueStr);

            this.calculationEndDate_ = StringConverter.xmlDateToDateTime(serial_VanillaRateTrigger.CalculationEndDate_.ValueStr);

            this.gearing_ = serial_VanillaRateTrigger.Gearing_.ValueStr;

            this.spread_ = serial_VanillaRateTrigger.Spread_.ValueStr;

            FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_VanillaRateTrigger.ReferenceCalculationInfo_;
            string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;

            this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
            this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);

            FpmlSerializedCSharp.PayoffDateInfo serial_payoffDateInfo = serial_VanillaRateTrigger.PayoffDateInfo_;
            string payoffDateInfotype = serial_payoffDateInfo.Excel_type_.ValueStr;

            this.payoffDateInfoViewModel_ = PayoffDateInfoViewModel.CreatePayoffDateInfo(payoffDateInfotype);
            this.payoffDateInfoViewModel_.setFromSerial(serial_payoffDateInfo);
        }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.StandardOption serial_StandardOption = serial_Class as FpmlSerializedCSharp.StandardOption;
            FpmlSerializedCSharp.BarrierWithConstRebateCallOption serial_BarrierWithConstRebateCallOption = serial_StandardOption.BarrierWithConstRebateCallOption_;

            FpmlSerializedCSharp.PayoffDateInfo serial_payoffDateInfo = serial_BarrierWithConstRebateCallOption.PayoffDateInfo_;
            string payoffDateInfotype = serial_payoffDateInfo.Excel_type_.ValueStr;

            this.payoffDateInfoViewModel_ = PayoffDateInfoViewModel.CreatePayoffDateInfo(payoffDateInfotype);
            this.payoffDateInfoViewModel_.setFromSerial(serial_payoffDateInfo);

            this.participateRate_ = serial_BarrierWithConstRebateCallOption.ParticipateRate_.ValueStr;

            FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_BarrierWithConstRebateCallOption.ReferenceCalculationInfo_;
            string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;

            this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
            this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);

            FpmlSerializedCSharp.BarrierInfo serial_barrierInfo = serial_BarrierWithConstRebateCallOption.BarrierInfo_;
            string barrierInfotype = serial_barrierInfo.Excel_type_.ValueStr;

            this.barrierInfoViewModel_ = BarrierInfoViewModel.CreateBarrierInfo(barrierInfotype);
            this.barrierInfoViewModel_.setFromSerial(serial_barrierInfo);

            this.strike_ = serial_BarrierWithConstRebateCallOption.Strike_.ValueStr;

            this.lowerBound_ = serial_BarrierWithConstRebateCallOption.LowerBound_.ValueStr;

            this.rebateRate_ = serial_BarrierWithConstRebateCallOption.RebateRate_.ValueStr;
        }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.ReturnCalculation         serial_ReturnCalculation         = serial_Class as FpmlSerializedCSharp.ReturnCalculation;
            FpmlSerializedCSharp.CallPutCompositeReturnCal serial_CallPutCompositeReturnCal = serial_ReturnCalculation.CallPutCompositeReturnCal_;

            this.weightViewModel_ = new ObservableCollection <WeightViewModel>();
            foreach (var item in serial_CallPutCompositeReturnCal.Weight_)
            {
                this.value_.Add(item.ValueStr);
            }

            FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_CallPutCompositeReturnCal.ReferenceCalculationInfo_;
            string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;

            this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
            this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);

            List <FpmlSerializedCSharp.OptionPayoffFunction> serial_optionPayoffFunction = serial_CallPutCompositeReturnCal.OptionPayoffFunction_;

            this.optionPayoffFunctionViewModel_ = new ObservableCollection <OptionPayoffFunctionViewModel>();
            foreach (var item in serial_optionPayoffFunction)
            {
                string type = item.Excel_type_.ValueStr;
                OptionPayoffFunctionViewModel viewModel = OptionPayoffFunctionViewModel.CreateOptionPayoffFunction(type);
                viewModel.setFromSerial(item);
                this.optionPayoffFunctionViewModel_.Add(viewModel);
            }
        }
Esempio n. 9
0
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.ReturnCalculation serial_ReturnCalculation = serial_Class as FpmlSerializedCSharp.ReturnCalculation;
            FpmlSerializedCSharp.VanillaReturnCal  serial_VanillaReturnCal  = serial_ReturnCalculation.VanillaReturnCal_;

            this.gearing_ = serial_VanillaReturnCal.Gearing_.ValueStr;

            this.spread_ = serial_VanillaReturnCal.Spread_.ValueStr;

            FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_VanillaReturnCal.ReferenceCalculationInfo_;
            string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;

            this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
            this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
        }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.ReturnCalculation serial_ReturnCalculation = serial_Class as FpmlSerializedCSharp.ReturnCalculation;
            FpmlSerializedCSharp.StopLossReturnCal serial_StopLossReturnCal = serial_ReturnCalculation.StopLossReturnCal_;

            this.power_ = serial_StopLossReturnCal.Power_.ValueStr;

            this.lossTrigger_ = serial_StopLossReturnCal.LossTrigger_.ValueStr;

            this.maximumLoss_ = serial_StopLossReturnCal.MaximumLoss_.ValueStr;

            FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_StopLossReturnCal.ReferenceCalculationInfo_;
            string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;

            this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
            this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);

            this.withNotional_ = serial_StopLossReturnCal.WithNotional_.ValueStr;

            this.isExpired_ = serial_StopLossReturnCal.IsExpired_.ValueStr;
        }
Esempio n. 11
0
        public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.VariableCalculation serial_VariableCalculation = serial_Class as FpmlSerializedCSharp.VariableCalculation;

            FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_VariableCalculation.ReferenceCalculationInfo_;
            string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;

            this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
            this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);

            FpmlSerializedCSharp.Operator1DList serial_operator1DList = serial_VariableCalculation.Operator1DList_;
            string operator1DListtype = serial_operator1DList.Excel_type_.ValueStr;

            this.operator1DListViewModel_ = Operator1DListViewModel.CreateOperator1DList(operator1DListtype);
            this.operator1DListViewModel_.setFromSerial(serial_operator1DList);

            FpmlSerializedCSharp.ConditionOperator serial_conditionOperator = serial_VariableCalculation.ConditionOperator_;
            string conditionOperatortype = serial_conditionOperator.Excel_type_.ValueStr;

            this.conditionOperatorViewModel_ = ConditionOperatorViewModel.CreateConditionOperator(conditionOperatortype);
            this.conditionOperatorViewModel_.setFromSerial(serial_conditionOperator);
        }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.EventCalculation serial_EventCalculation = serial_Class as FpmlSerializedCSharp.EventCalculation;
     FpmlSerializedCSharp.SimpleRangeEventCal serial_SimpleRangeEventCal = serial_EventCalculation.SimpleRangeEventCal_;
 
     FpmlSerializedCSharp.Range1D serial_range1D = serial_SimpleRangeEventCal.Range1D_;
     string range1Dtype = serial_range1D.Excel_type_.ValueStr;
     this.range1DViewModel_ = Range1DViewModel.CreateRange1D(range1Dtype);
     this.range1DViewModel_.setFromSerial(serial_range1D);
     
     FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_SimpleRangeEventCal.ReferenceCalculationInfo_;
     string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;
     this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
     this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
     
     FpmlSerializedCSharp.DateInformation serial_dateInformation = serial_SimpleRangeEventCal.DateInformation_;
     string dateInformationtype = serial_dateInformation.Excel_type_.ValueStr;
     this.dateInformationViewModel_ = DateInformationViewModel.CreateDateInformation(dateInformationtype);
     this.dateInformationViewModel_.setFromSerial(serial_dateInformation);
     
     FpmlSerializedCSharp.JointSimpleCalculation serial_jointSimpleCalculation = serial_SimpleRangeEventCal.JointSimpleCalculation_;
     string jointSimpleCalculationtype = serial_jointSimpleCalculation.Excel_type_.ValueStr;
     this.jointSimpleCalculationViewModel_ = JointSimpleCalculationViewModel.CreateJointSimpleCalculation(jointSimpleCalculationtype);
     this.jointSimpleCalculationViewModel_.setFromSerial(serial_jointSimpleCalculation);
     
 }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.ReturnCalculation serial_ReturnCalculation = serial_Class as FpmlSerializedCSharp.ReturnCalculation;
     FpmlSerializedCSharp.CallPutCompositeReturnCal serial_CallPutCompositeReturnCal = serial_ReturnCalculation.CallPutCompositeReturnCal_;
 
     this.weightViewModel_ = new ObservableCollection<WeightViewModel>();
     foreach (var item in serial_CallPutCompositeReturnCal.Weight_)
     {
         this.value_.Add(item.ValueStr);
     }
     
     FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_CallPutCompositeReturnCal.ReferenceCalculationInfo_;
     string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;
     this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
     this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
     
     List<FpmlSerializedCSharp.OptionPayoffFunction> serial_optionPayoffFunction = serial_CallPutCompositeReturnCal.OptionPayoffFunction_;
     this.optionPayoffFunctionViewModel_ = new ObservableCollection<OptionPayoffFunctionViewModel>();
     foreach (var item in serial_optionPayoffFunction)
     {
         string type = item.Excel_type_.ValueStr;
         OptionPayoffFunctionViewModel viewModel = OptionPayoffFunctionViewModel.CreateOptionPayoffFunction(type);
         viewModel.setFromSerial(item);
         this.optionPayoffFunctionViewModel_.Add(viewModel);
     }
     
 }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.EventTrigger serial_EventTrigger = serial_Class as FpmlSerializedCSharp.EventTrigger;
     FpmlSerializedCSharp.SimpleRangeAccrualRateTrigger serial_SimpleRangeAccrualRateTrigger = serial_EventTrigger.SimpleRangeAccrualRateTrigger_;
 
     this.dayCounter_ = serial_SimpleRangeAccrualRateTrigger.DayCounter_.ValueStr;
     
     this.calculationStartDate_ = StringConverter.xmlDateToDateTime(serial_SimpleRangeAccrualRateTrigger.CalculationStartDate_.ValueStr);
     
     this.calculationEndDate_ = StringConverter.xmlDateToDateTime(serial_SimpleRangeAccrualRateTrigger.CalculationEndDate_.ValueStr);
     
     FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_SimpleRangeAccrualRateTrigger.ReferenceCalculationInfo_;
     string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;
     this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
     this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
     
     FpmlSerializedCSharp.SimpleRangeEventList serial_simpleRangeEventList = serial_SimpleRangeAccrualRateTrigger.SimpleRangeEventList_;
     string simpleRangeEventListtype = serial_simpleRangeEventList.Excel_type_.ValueStr;
     this.simpleRangeEventListViewModel_ = SimpleRangeEventListViewModel.CreateSimpleRangeEventList(simpleRangeEventListtype);
     this.simpleRangeEventListViewModel_.setFromSerial(serial_simpleRangeEventList);
     
     FpmlSerializedCSharp.PayoffDateInfo serial_payoffDateInfo = serial_SimpleRangeAccrualRateTrigger.PayoffDateInfo_;
     string payoffDateInfotype = serial_payoffDateInfo.Excel_type_.ValueStr;
     this.payoffDateInfoViewModel_ = PayoffDateInfoViewModel.CreatePayoffDateInfo(payoffDateInfotype);
     this.payoffDateInfoViewModel_.setFromSerial(serial_payoffDateInfo);
     
     this.denumerDateNum_ = serial_SimpleRangeAccrualRateTrigger.DenumerDateNum_.ValueStr;
     
 }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.EventTrigger serial_EventTrigger = serial_Class as FpmlSerializedCSharp.EventTrigger;
     FpmlSerializedCSharp.VanillaRateTrigger serial_VanillaRateTrigger = serial_EventTrigger.VanillaRateTrigger_;
 
     this.dayCounter_ = serial_VanillaRateTrigger.DayCounter_.ValueStr;
     
     this.calculationStartDate_ = StringConverter.xmlDateToDateTime(serial_VanillaRateTrigger.CalculationStartDate_.ValueStr);
     
     this.calculationEndDate_ = StringConverter.xmlDateToDateTime(serial_VanillaRateTrigger.CalculationEndDate_.ValueStr);
     
     this.gearing_ = serial_VanillaRateTrigger.Gearing_.ValueStr;
     
     this.spread_ = serial_VanillaRateTrigger.Spread_.ValueStr;
     
     FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_VanillaRateTrigger.ReferenceCalculationInfo_;
     string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;
     this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
     this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
     
     FpmlSerializedCSharp.PayoffDateInfo serial_payoffDateInfo = serial_VanillaRateTrigger.PayoffDateInfo_;
     string payoffDateInfotype = serial_payoffDateInfo.Excel_type_.ValueStr;
     this.payoffDateInfoViewModel_ = PayoffDateInfoViewModel.CreatePayoffDateInfo(payoffDateInfotype);
     this.payoffDateInfoViewModel_.setFromSerial(serial_payoffDateInfo);
     
 }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.ReturnCalculation serial_ReturnCalculation = serial_Class as FpmlSerializedCSharp.ReturnCalculation;
     FpmlSerializedCSharp.StopLossReturnCal serial_StopLossReturnCal = serial_ReturnCalculation.StopLossReturnCal_;
 
     this.power_ = serial_StopLossReturnCal.Power_.ValueStr;
     
     this.lossTrigger_ = serial_StopLossReturnCal.LossTrigger_.ValueStr;
     
     this.maximumLoss_ = serial_StopLossReturnCal.MaximumLoss_.ValueStr;
     
     FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_StopLossReturnCal.ReferenceCalculationInfo_;
     string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;
     this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
     this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
     
     this.withNotional_ = serial_StopLossReturnCal.WithNotional_.ValueStr;
     
     this.isExpired_ = serial_StopLossReturnCal.IsExpired_.ValueStr;
     
 }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.EventCalculation serial_EventCalculation = serial_Class as FpmlSerializedCSharp.EventCalculation;
     FpmlSerializedCSharp.LowerBarrierEventCal serial_LowerBarrierEventCal = serial_EventCalculation.LowerBarrierEventCal_;
 
     List<FpmlSerializedCSharp.DateInformation> serial_dateInformation = serial_LowerBarrierEventCal.DateInformation_;
     this.dateInformationViewModel_ = new ObservableCollection<DateInformationViewModel>();
     foreach (var item in serial_dateInformation)
     {
         string type = item.Excel_type_.ValueStr;
         DateInformationViewModel viewModel = DateInformationViewModel.CreateDateInformation(type);
         viewModel.setFromSerial(item);
         this.dateInformationViewModel_.Add(viewModel);
     }
     
     this.lowerTriggerViewModel_ = new ObservableCollection<LowerTriggerViewModel>();
     foreach (var item in serial_LowerBarrierEventCal.LowerTrigger_)
     {
         this.value_.Add(item.ValueStr);
     }
     
     FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_LowerBarrierEventCal.ReferenceCalculationInfo_;
     string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;
     this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
     this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
     
 }
 public  void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.VariableCalculation serial_VariableCalculation = serial_Class as FpmlSerializedCSharp.VariableCalculation;
 
     FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_VariableCalculation.ReferenceCalculationInfo_;
     string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;
     this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
     this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
     
     FpmlSerializedCSharp.Operator1DList serial_operator1DList = serial_VariableCalculation.Operator1DList_;
     string operator1DListtype = serial_operator1DList.Excel_type_.ValueStr;
     this.operator1DListViewModel_ = Operator1DListViewModel.CreateOperator1DList(operator1DListtype);
     this.operator1DListViewModel_.setFromSerial(serial_operator1DList);
     
     FpmlSerializedCSharp.ConditionOperator serial_conditionOperator = serial_VariableCalculation.ConditionOperator_;
     string conditionOperatortype = serial_conditionOperator.Excel_type_.ValueStr;
     this.conditionOperatorViewModel_ = ConditionOperatorViewModel.CreateConditionOperator(conditionOperatortype);
     this.conditionOperatorViewModel_.setFromSerial(serial_conditionOperator);
     
 }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.BarrierInfo serial_BarrierInfo = serial_Class as FpmlSerializedCSharp.BarrierInfo;
     FpmlSerializedCSharp.ConstLowerBarrierInfo serial_ConstLowerBarrierInfo = serial_BarrierInfo.ConstLowerBarrierInfo_;
 
     FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_ConstLowerBarrierInfo.ReferenceCalculationInfo_;
     string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;
     this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
     this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
     
     FpmlSerializedCSharp.BarrierDateInfo serial_barrierDateInfo = serial_ConstLowerBarrierInfo.BarrierDateInfo_;
     string barrierDateInfotype = serial_barrierDateInfo.Excel_type_.ValueStr;
     this.barrierDateInfoViewModel_ = BarrierDateInfoViewModel.CreateBarrierDateInfo(barrierDateInfotype);
     this.barrierDateInfoViewModel_.setFromSerial(serial_barrierDateInfo);
     
     this.trigger_ = serial_ConstLowerBarrierInfo.Trigger_.ValueStr;
     
     this.pastEventOccDate_ = StringConverter.xmlDateToDateTime(serial_ConstLowerBarrierInfo.PastEventOccDate_.ValueStr);
     
     this.pastEventOccValue_ = serial_ConstLowerBarrierInfo.PastEventOccValue_.ValueStr;
     
     this.refVariableFlag_eventOccDate_ = StringConverter.xmlDateToDateTime(serial_ConstLowerBarrierInfo.RefVariableFlag_eventOccDate_.ValueStr);
     
     this.refVariableFlag_eventOccValue_ = serial_ConstLowerBarrierInfo.RefVariableFlag_eventOccValue_.ValueStr;
     
 }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.StandardOption serial_StandardOption = serial_Class as FpmlSerializedCSharp.StandardOption;
     FpmlSerializedCSharp.VanillaCallOption serial_VanillaCallOption = serial_StandardOption.VanillaCallOption_;
 
     FpmlSerializedCSharp.PayoffDateInfo serial_payoffDateInfo = serial_VanillaCallOption.PayoffDateInfo_;
     string payoffDateInfotype = serial_payoffDateInfo.Excel_type_.ValueStr;
     this.payoffDateInfoViewModel_ = PayoffDateInfoViewModel.CreatePayoffDateInfo(payoffDateInfotype);
     this.payoffDateInfoViewModel_.setFromSerial(serial_payoffDateInfo);
     
     this.participateRate_ = serial_VanillaCallOption.ParticipateRate_.ValueStr;
     
     FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_VanillaCallOption.ReferenceCalculationInfo_;
     string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;
     this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
     this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
     
     this.strike_ = serial_VanillaCallOption.Strike_.ValueStr;
     
     this.lowerBound_ = serial_VanillaCallOption.LowerBound_.ValueStr;
     
 }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.ReturnCalculation serial_ReturnCalculation = serial_Class as FpmlSerializedCSharp.ReturnCalculation;
     FpmlSerializedCSharp.VanillaReturnCal serial_VanillaReturnCal = serial_ReturnCalculation.VanillaReturnCal_;
 
     this.gearing_ = serial_VanillaReturnCal.Gearing_.ValueStr;
     
     this.spread_ = serial_VanillaReturnCal.Spread_.ValueStr;
     
     FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_VanillaReturnCal.ReferenceCalculationInfo_;
     string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;
     this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
     this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
     
 }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.PayoffInfo serial_PayoffInfo = serial_Class as FpmlSerializedCSharp.PayoffInfo;
     FpmlSerializedCSharp.CompositeSumOptionPayoff serial_CompositeSumOptionPayoff = serial_PayoffInfo.CompositeSumOptionPayoff_;
 
     FpmlSerializedCSharp.FixingDateInfo serial_fixingDateInfo = serial_CompositeSumOptionPayoff.FixingDateInfo_;
     string fixingDateInfotype = serial_fixingDateInfo.Excel_type_.ValueStr;
     this.fixingDateInfoViewModel_ = FixingDateInfoViewModel.CreateFixingDateInfo(fixingDateInfotype);
     this.fixingDateInfoViewModel_.setFromSerial(serial_fixingDateInfo);
     
     FpmlSerializedCSharp.PayoffDateInfo serial_payoffDateInfo = serial_CompositeSumOptionPayoff.PayoffDateInfo_;
     string payoffDateInfotype = serial_payoffDateInfo.Excel_type_.ValueStr;
     this.payoffDateInfoViewModel_ = PayoffDateInfoViewModel.CreatePayoffDateInfo(payoffDateInfotype);
     this.payoffDateInfoViewModel_.setFromSerial(serial_payoffDateInfo);
     
     FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_CompositeSumOptionPayoff.ReferenceCalculationInfo_;
     string referenceCalculationInfotype = serial_referenceCalculationInfo.Excel_type_.ValueStr;
     this.referenceCalculationInfoViewModel_ = ReferenceCalculationInfoViewModel.CreateReferenceCalculationInfo(referenceCalculationInfotype);
     this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo);
     
     List<FpmlSerializedCSharp.StandardOption> serial_standardOption = serial_CompositeSumOptionPayoff.StandardOption_;
     this.standardOptionViewModel_ = new ObservableCollection<StandardOptionViewModel>();
     foreach (var item in serial_standardOption)
     {
         string type = item.Excel_type_.ValueStr;
         StandardOptionViewModel viewModel = StandardOptionViewModel.CreateStandardOption(type);
         viewModel.setFromSerial(item);
         this.standardOptionViewModel_.Add(viewModel);
     }
     
 }