public NonDeliverableSettlement(XmlNode xmlNode)
        {
            XmlNodeList referenceCurrencyNodeList = xmlNode.SelectNodes("referenceCurrency");

            if (referenceCurrencyNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in referenceCurrencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        referenceCurrencyIDRef = item.Attributes["id"].Name;
                        Currency ob = Currency();
                        IDManager.SetID(referenceCurrencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        referenceCurrencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        referenceCurrency = new Currency(item);
                    }
                }
            }


            XmlNodeList fxFixingDateNodeList = xmlNode.SelectNodes("fxFixingDate");

            if (fxFixingDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in fxFixingDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxFixingDateIDRef = item.Attributes["id"].Name;
                        FxFixingDate ob = FxFixingDate();
                        IDManager.SetID(fxFixingDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxFixingDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxFixingDate = new FxFixingDate(item);
                    }
                }
            }


            XmlNodeList fxFixingScheduleNodeList = xmlNode.SelectNodes("fxFixingSchedule");

            if (fxFixingScheduleNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in fxFixingScheduleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxFixingScheduleIDRef = item.Attributes["id"].Name;
                        AdjustableDates ob = AdjustableDates();
                        IDManager.SetID(fxFixingScheduleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxFixingScheduleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxFixingSchedule = new AdjustableDates(item);
                    }
                }
            }


            XmlNodeList settlementRateOptionNodeList = xmlNode.SelectNodes("settlementRateOption");

            if (settlementRateOptionNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in settlementRateOptionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementRateOptionIDRef = item.Attributes["id"].Name;
                        SettlementRateOption ob = SettlementRateOption();
                        IDManager.SetID(settlementRateOptionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementRateOptionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementRateOption = new SettlementRateOption(item);
                    }
                }
            }


            XmlNodeList priceSourceDisruptionNodeList = xmlNode.SelectNodes("priceSourceDisruption");

            if (priceSourceDisruptionNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in priceSourceDisruptionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        priceSourceDisruptionIDRef = item.Attributes["id"].Name;
                        PriceSourceDisruption ob = PriceSourceDisruption();
                        IDManager.SetID(priceSourceDisruptionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        priceSourceDisruptionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        priceSourceDisruption = new PriceSourceDisruption(item);
                    }
                }
            }
        }
 public NonDeliverableSettlement(XmlNode xmlNode)
 {
     XmlNodeList referenceCurrencyNodeList = xmlNode.SelectNodes("referenceCurrency");
     if (referenceCurrencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in referenceCurrencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 referenceCurrencyIDRef = item.Attributes["id"].Name;
                 Currency ob = Currency();
                 IDManager.SetID(referenceCurrencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 referenceCurrencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 referenceCurrency = new Currency(item);
             }
         }
     }
     
 
     XmlNodeList fxFixingDateNodeList = xmlNode.SelectNodes("fxFixingDate");
     if (fxFixingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxFixingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxFixingDateIDRef = item.Attributes["id"].Name;
                 FxFixingDate ob = FxFixingDate();
                 IDManager.SetID(fxFixingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxFixingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxFixingDate = new FxFixingDate(item);
             }
         }
     }
     
 
     XmlNodeList fxFixingScheduleNodeList = xmlNode.SelectNodes("fxFixingSchedule");
     if (fxFixingScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxFixingScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxFixingScheduleIDRef = item.Attributes["id"].Name;
                 AdjustableDates ob = AdjustableDates();
                 IDManager.SetID(fxFixingScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxFixingScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxFixingSchedule = new AdjustableDates(item);
             }
         }
     }
     
 
     XmlNodeList settlementRateOptionNodeList = xmlNode.SelectNodes("settlementRateOption");
     if (settlementRateOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementRateOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementRateOptionIDRef = item.Attributes["id"].Name;
                 SettlementRateOption ob = SettlementRateOption();
                 IDManager.SetID(settlementRateOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementRateOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementRateOption = new SettlementRateOption(item);
             }
         }
     }
     
 
     XmlNodeList priceSourceDisruptionNodeList = xmlNode.SelectNodes("priceSourceDisruption");
     if (priceSourceDisruptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in priceSourceDisruptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 priceSourceDisruptionIDRef = item.Attributes["id"].Name;
                 PriceSourceDisruption ob = PriceSourceDisruption();
                 IDManager.SetID(priceSourceDisruptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 priceSourceDisruptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 priceSourceDisruption = new PriceSourceDisruption(item);
             }
         }
     }
     
 
 }
示例#3
0
        public NonDeliverableSettlement(XmlNode xmlNode)
        {
            XmlNode referenceCurrencyNode = xmlNode.SelectSingleNode("referenceCurrency");

            if (referenceCurrencyNode != null)
            {
                if (referenceCurrencyNode.Attributes["href"] != null || referenceCurrencyNode.Attributes["id"] != null)
                {
                    if (referenceCurrencyNode.Attributes["id"] != null)
                    {
                        referenceCurrencyIDRef_ = referenceCurrencyNode.Attributes["id"].Value;
                        Currency ob = new Currency(referenceCurrencyNode);
                        IDManager.SetID(referenceCurrencyIDRef_, ob);
                    }
                    else if (referenceCurrencyNode.Attributes["href"] != null)
                    {
                        referenceCurrencyIDRef_ = referenceCurrencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        referenceCurrency_ = new Currency(referenceCurrencyNode);
                    }
                }
                else
                {
                    referenceCurrency_ = new Currency(referenceCurrencyNode);
                }
            }


            XmlNode fxFixingDateNode = xmlNode.SelectSingleNode("fxFixingDate");

            if (fxFixingDateNode != null)
            {
                if (fxFixingDateNode.Attributes["href"] != null || fxFixingDateNode.Attributes["id"] != null)
                {
                    if (fxFixingDateNode.Attributes["id"] != null)
                    {
                        fxFixingDateIDRef_ = fxFixingDateNode.Attributes["id"].Value;
                        FxFixingDate ob = new FxFixingDate(fxFixingDateNode);
                        IDManager.SetID(fxFixingDateIDRef_, ob);
                    }
                    else if (fxFixingDateNode.Attributes["href"] != null)
                    {
                        fxFixingDateIDRef_ = fxFixingDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxFixingDate_ = new FxFixingDate(fxFixingDateNode);
                    }
                }
                else
                {
                    fxFixingDate_ = new FxFixingDate(fxFixingDateNode);
                }
            }


            XmlNode fxFixingScheduleNode = xmlNode.SelectSingleNode("fxFixingSchedule");

            if (fxFixingScheduleNode != null)
            {
                if (fxFixingScheduleNode.Attributes["href"] != null || fxFixingScheduleNode.Attributes["id"] != null)
                {
                    if (fxFixingScheduleNode.Attributes["id"] != null)
                    {
                        fxFixingScheduleIDRef_ = fxFixingScheduleNode.Attributes["id"].Value;
                        AdjustableDates ob = new AdjustableDates(fxFixingScheduleNode);
                        IDManager.SetID(fxFixingScheduleIDRef_, ob);
                    }
                    else if (fxFixingScheduleNode.Attributes["href"] != null)
                    {
                        fxFixingScheduleIDRef_ = fxFixingScheduleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxFixingSchedule_ = new AdjustableDates(fxFixingScheduleNode);
                    }
                }
                else
                {
                    fxFixingSchedule_ = new AdjustableDates(fxFixingScheduleNode);
                }
            }


            XmlNode settlementRateOptionNode = xmlNode.SelectSingleNode("settlementRateOption");

            if (settlementRateOptionNode != null)
            {
                if (settlementRateOptionNode.Attributes["href"] != null || settlementRateOptionNode.Attributes["id"] != null)
                {
                    if (settlementRateOptionNode.Attributes["id"] != null)
                    {
                        settlementRateOptionIDRef_ = settlementRateOptionNode.Attributes["id"].Value;
                        SettlementRateOption ob = new SettlementRateOption(settlementRateOptionNode);
                        IDManager.SetID(settlementRateOptionIDRef_, ob);
                    }
                    else if (settlementRateOptionNode.Attributes["href"] != null)
                    {
                        settlementRateOptionIDRef_ = settlementRateOptionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementRateOption_ = new SettlementRateOption(settlementRateOptionNode);
                    }
                }
                else
                {
                    settlementRateOption_ = new SettlementRateOption(settlementRateOptionNode);
                }
            }


            XmlNode priceSourceDisruptionNode = xmlNode.SelectSingleNode("priceSourceDisruption");

            if (priceSourceDisruptionNode != null)
            {
                if (priceSourceDisruptionNode.Attributes["href"] != null || priceSourceDisruptionNode.Attributes["id"] != null)
                {
                    if (priceSourceDisruptionNode.Attributes["id"] != null)
                    {
                        priceSourceDisruptionIDRef_ = priceSourceDisruptionNode.Attributes["id"].Value;
                        PriceSourceDisruption ob = new PriceSourceDisruption(priceSourceDisruptionNode);
                        IDManager.SetID(priceSourceDisruptionIDRef_, ob);
                    }
                    else if (priceSourceDisruptionNode.Attributes["href"] != null)
                    {
                        priceSourceDisruptionIDRef_ = priceSourceDisruptionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        priceSourceDisruption_ = new PriceSourceDisruption(priceSourceDisruptionNode);
                    }
                }
                else
                {
                    priceSourceDisruption_ = new PriceSourceDisruption(priceSourceDisruptionNode);
                }
            }
        }
 public NonDeliverableSettlement(XmlNode xmlNode)
 {
     XmlNode referenceCurrencyNode = xmlNode.SelectSingleNode("referenceCurrency");
     
     if (referenceCurrencyNode != null)
     {
         if (referenceCurrencyNode.Attributes["href"] != null || referenceCurrencyNode.Attributes["id"] != null) 
         {
             if (referenceCurrencyNode.Attributes["id"] != null) 
             {
                 referenceCurrencyIDRef_ = referenceCurrencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(referenceCurrencyNode);
                 IDManager.SetID(referenceCurrencyIDRef_, ob);
             }
             else if (referenceCurrencyNode.Attributes["href"] != null)
             {
                 referenceCurrencyIDRef_ = referenceCurrencyNode.Attributes["href"].Value;
             }
             else
             {
                 referenceCurrency_ = new Currency(referenceCurrencyNode);
             }
         }
         else
         {
             referenceCurrency_ = new Currency(referenceCurrencyNode);
         }
     }
     
 
     XmlNode fxFixingDateNode = xmlNode.SelectSingleNode("fxFixingDate");
     
     if (fxFixingDateNode != null)
     {
         if (fxFixingDateNode.Attributes["href"] != null || fxFixingDateNode.Attributes["id"] != null) 
         {
             if (fxFixingDateNode.Attributes["id"] != null) 
             {
                 fxFixingDateIDRef_ = fxFixingDateNode.Attributes["id"].Value;
                 FxFixingDate ob = new FxFixingDate(fxFixingDateNode);
                 IDManager.SetID(fxFixingDateIDRef_, ob);
             }
             else if (fxFixingDateNode.Attributes["href"] != null)
             {
                 fxFixingDateIDRef_ = fxFixingDateNode.Attributes["href"].Value;
             }
             else
             {
                 fxFixingDate_ = new FxFixingDate(fxFixingDateNode);
             }
         }
         else
         {
             fxFixingDate_ = new FxFixingDate(fxFixingDateNode);
         }
     }
     
 
     XmlNode fxFixingScheduleNode = xmlNode.SelectSingleNode("fxFixingSchedule");
     
     if (fxFixingScheduleNode != null)
     {
         if (fxFixingScheduleNode.Attributes["href"] != null || fxFixingScheduleNode.Attributes["id"] != null) 
         {
             if (fxFixingScheduleNode.Attributes["id"] != null) 
             {
                 fxFixingScheduleIDRef_ = fxFixingScheduleNode.Attributes["id"].Value;
                 AdjustableDates ob = new AdjustableDates(fxFixingScheduleNode);
                 IDManager.SetID(fxFixingScheduleIDRef_, ob);
             }
             else if (fxFixingScheduleNode.Attributes["href"] != null)
             {
                 fxFixingScheduleIDRef_ = fxFixingScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 fxFixingSchedule_ = new AdjustableDates(fxFixingScheduleNode);
             }
         }
         else
         {
             fxFixingSchedule_ = new AdjustableDates(fxFixingScheduleNode);
         }
     }
     
 
     XmlNode settlementRateOptionNode = xmlNode.SelectSingleNode("settlementRateOption");
     
     if (settlementRateOptionNode != null)
     {
         if (settlementRateOptionNode.Attributes["href"] != null || settlementRateOptionNode.Attributes["id"] != null) 
         {
             if (settlementRateOptionNode.Attributes["id"] != null) 
             {
                 settlementRateOptionIDRef_ = settlementRateOptionNode.Attributes["id"].Value;
                 SettlementRateOption ob = new SettlementRateOption(settlementRateOptionNode);
                 IDManager.SetID(settlementRateOptionIDRef_, ob);
             }
             else if (settlementRateOptionNode.Attributes["href"] != null)
             {
                 settlementRateOptionIDRef_ = settlementRateOptionNode.Attributes["href"].Value;
             }
             else
             {
                 settlementRateOption_ = new SettlementRateOption(settlementRateOptionNode);
             }
         }
         else
         {
             settlementRateOption_ = new SettlementRateOption(settlementRateOptionNode);
         }
     }
     
 
     XmlNode priceSourceDisruptionNode = xmlNode.SelectSingleNode("priceSourceDisruption");
     
     if (priceSourceDisruptionNode != null)
     {
         if (priceSourceDisruptionNode.Attributes["href"] != null || priceSourceDisruptionNode.Attributes["id"] != null) 
         {
             if (priceSourceDisruptionNode.Attributes["id"] != null) 
             {
                 priceSourceDisruptionIDRef_ = priceSourceDisruptionNode.Attributes["id"].Value;
                 PriceSourceDisruption ob = new PriceSourceDisruption(priceSourceDisruptionNode);
                 IDManager.SetID(priceSourceDisruptionIDRef_, ob);
             }
             else if (priceSourceDisruptionNode.Attributes["href"] != null)
             {
                 priceSourceDisruptionIDRef_ = priceSourceDisruptionNode.Attributes["href"].Value;
             }
             else
             {
                 priceSourceDisruption_ = new PriceSourceDisruption(priceSourceDisruptionNode);
             }
         }
         else
         {
             priceSourceDisruption_ = new PriceSourceDisruption(priceSourceDisruptionNode);
         }
     }
     
 
 }