public StrategyComponentIdentification(XmlNode xmlNode)
 {
     XmlNodeList tradeIdentifierReferenceNodeList = xmlNode.SelectNodes("tradeIdentifierReference");
     if (tradeIdentifierReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeIdentifierReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeIdentifierReferenceIDRef = item.Attributes["id"].Name;
                 PartyTradeIdentifierReference ob = PartyTradeIdentifierReference();
                 IDManager.SetID(tradeIdentifierReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeIdentifierReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tradeIdentifierReference = new PartyTradeIdentifierReference(item);
             }
         }
     }
     
 
     XmlNodeList componentReferenceNodeList = xmlNode.SelectNodes("componentReference");
     if (componentReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in componentReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 componentReferenceIDRef = item.Attributes["id"].Name;
                 ProductReference ob = ProductReference();
                 IDManager.SetID(componentReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 componentReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 componentReference = new ProductReference(item);
             }
         }
     }
     
 
 }
Esempio n. 2
0
        public StrategyComponentIdentification(XmlNode xmlNode)
        {
            XmlNodeList tradeIdentifierReferenceNodeList = xmlNode.SelectNodes("tradeIdentifierReference");

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

            foreach (XmlNode item in tradeIdentifierReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tradeIdentifierReferenceIDRef = item.Attributes["id"].Name;
                        PartyTradeIdentifierReference ob = PartyTradeIdentifierReference();
                        IDManager.SetID(tradeIdentifierReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tradeIdentifierReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tradeIdentifierReference = new PartyTradeIdentifierReference(item);
                    }
                }
            }


            XmlNodeList componentReferenceNodeList = xmlNode.SelectNodes("componentReference");

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

            foreach (XmlNode item in componentReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        componentReferenceIDRef = item.Attributes["id"].Name;
                        ProductReference ob = ProductReference();
                        IDManager.SetID(componentReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        componentReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        componentReference = new ProductReference(item);
                    }
                }
            }
        }
        public StrategyComponentIdentification(XmlNode xmlNode)
        {
            XmlNode tradeIdentifierReferenceNode = xmlNode.SelectSingleNode("tradeIdentifierReference");

            if (tradeIdentifierReferenceNode != null)
            {
                if (tradeIdentifierReferenceNode.Attributes["href"] != null || tradeIdentifierReferenceNode.Attributes["id"] != null)
                {
                    if (tradeIdentifierReferenceNode.Attributes["id"] != null)
                    {
                        tradeIdentifierReferenceIDRef_ = tradeIdentifierReferenceNode.Attributes["id"].Value;
                        PartyTradeIdentifierReference ob = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
                        IDManager.SetID(tradeIdentifierReferenceIDRef_, ob);
                    }
                    else if (tradeIdentifierReferenceNode.Attributes["href"] != null)
                    {
                        tradeIdentifierReferenceIDRef_ = tradeIdentifierReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tradeIdentifierReference_ = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
                    }
                }
                else
                {
                    tradeIdentifierReference_ = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
                }
            }


            XmlNode componentReferenceNode = xmlNode.SelectSingleNode("componentReference");

            if (componentReferenceNode != null)
            {
                if (componentReferenceNode.Attributes["href"] != null || componentReferenceNode.Attributes["id"] != null)
                {
                    if (componentReferenceNode.Attributes["id"] != null)
                    {
                        componentReferenceIDRef_ = componentReferenceNode.Attributes["id"].Value;
                        ProductReference ob = new ProductReference(componentReferenceNode);
                        IDManager.SetID(componentReferenceIDRef_, ob);
                    }
                    else if (componentReferenceNode.Attributes["href"] != null)
                    {
                        componentReferenceIDRef_ = componentReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        componentReference_ = new ProductReference(componentReferenceNode);
                    }
                }
                else
                {
                    componentReference_ = new ProductReference(componentReferenceNode);
                }
            }
        }
 public FxSwapLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList tradeIdentifierReferenceNodeList = xmlNode.SelectNodes("tradeIdentifierReference");
     if (tradeIdentifierReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeIdentifierReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeIdentifierReferenceIDRef = item.Attributes["id"].Name;
                 PartyTradeIdentifierReference ob = PartyTradeIdentifierReference();
                 IDManager.SetID(tradeIdentifierReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeIdentifierReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tradeIdentifierReference = new PartyTradeIdentifierReference(item);
             }
         }
     }
     
 
     XmlNodeList exchangedCurrency1NodeList = xmlNode.SelectNodes("exchangedCurrency1");
     if (exchangedCurrency1NodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangedCurrency1NodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangedCurrency1IDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(exchangedCurrency1IDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangedCurrency1IDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangedCurrency1 = new Payment(item);
             }
         }
     }
     
 
     XmlNodeList exchangedCurrency2NodeList = xmlNode.SelectNodes("exchangedCurrency2");
     if (exchangedCurrency2NodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangedCurrency2NodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangedCurrency2IDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(exchangedCurrency2IDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangedCurrency2IDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangedCurrency2 = new Payment(item);
             }
         }
     }
     
 
     XmlNodeList dealtCurrencyNodeList = xmlNode.SelectNodes("dealtCurrency");
     if (dealtCurrencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dealtCurrencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dealtCurrencyIDRef = item.Attributes["id"].Name;
                 DealtCurrencyEnum ob = DealtCurrencyEnum();
                 IDManager.SetID(dealtCurrencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dealtCurrencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dealtCurrency = new DealtCurrencyEnum(item);
             }
         }
     }
     
 
     XmlNodeList tenorNameNodeList = xmlNode.SelectNodes("tenorName");
     if (tenorNameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tenorNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tenorNameIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(tenorNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tenorNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tenorName = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList tenorPeriodNodeList = xmlNode.SelectNodes("tenorPeriod");
     if (tenorPeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tenorPeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tenorPeriodIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(tenorPeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tenorPeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tenorPeriod = new Period(item);
             }
         }
     }
     
 
     XmlNodeList valueDateNodeList = xmlNode.SelectNodes("valueDate");
     if (valueDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valueDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valueDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(valueDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valueDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valueDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList currency1ValueDateNodeList = xmlNode.SelectNodes("currency1ValueDate");
     if (currency1ValueDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in currency1ValueDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 currency1ValueDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(currency1ValueDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 currency1ValueDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 currency1ValueDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList currency2ValueDateNodeList = xmlNode.SelectNodes("currency2ValueDate");
     if (currency2ValueDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in currency2ValueDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 currency2ValueDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(currency2ValueDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 currency2ValueDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 currency2ValueDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList exchangeRateNodeList = xmlNode.SelectNodes("exchangeRate");
     if (exchangeRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeRateIDRef = item.Attributes["id"].Name;
                 ExchangeRate ob = ExchangeRate();
                 IDManager.SetID(exchangeRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeRate = new ExchangeRate(item);
             }
         }
     }
     
 
     XmlNodeList nonDeliverableSettlementNodeList = xmlNode.SelectNodes("nonDeliverableSettlement");
     if (nonDeliverableSettlementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nonDeliverableSettlementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nonDeliverableSettlementIDRef = item.Attributes["id"].Name;
                 FxCashSettlement ob = FxCashSettlement();
                 IDManager.SetID(nonDeliverableSettlementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nonDeliverableSettlementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 nonDeliverableSettlement = new FxCashSettlement(item);
             }
         }
     }
     
 
 }
 public GrossCashflow(XmlNode xmlNode)
 {
     XmlNode cashflowIdNode = xmlNode.SelectSingleNode("cashflowId");
     
     if (cashflowIdNode != null)
     {
         if (cashflowIdNode.Attributes["href"] != null || cashflowIdNode.Attributes["id"] != null) 
         {
             if (cashflowIdNode.Attributes["id"] != null) 
             {
                 cashflowIdIDRef_ = cashflowIdNode.Attributes["id"].Value;
                 CashflowId ob = new CashflowId(cashflowIdNode);
                 IDManager.SetID(cashflowIdIDRef_, ob);
             }
             else if (cashflowIdNode.Attributes["href"] != null)
             {
                 cashflowIdIDRef_ = cashflowIdNode.Attributes["href"].Value;
             }
             else
             {
                 cashflowId_ = new CashflowId(cashflowIdNode);
             }
         }
         else
         {
             cashflowId_ = new CashflowId(cashflowIdNode);
         }
     }
     
 
     XmlNode partyTradeIdentifierReferenceNode = xmlNode.SelectSingleNode("partyTradeIdentifierReference");
     
     if (partyTradeIdentifierReferenceNode != null)
     {
         if (partyTradeIdentifierReferenceNode.Attributes["href"] != null || partyTradeIdentifierReferenceNode.Attributes["id"] != null) 
         {
             if (partyTradeIdentifierReferenceNode.Attributes["id"] != null) 
             {
                 partyTradeIdentifierReferenceIDRef_ = partyTradeIdentifierReferenceNode.Attributes["id"].Value;
                 PartyTradeIdentifierReference ob = new PartyTradeIdentifierReference(partyTradeIdentifierReferenceNode);
                 IDManager.SetID(partyTradeIdentifierReferenceIDRef_, ob);
             }
             else if (partyTradeIdentifierReferenceNode.Attributes["href"] != null)
             {
                 partyTradeIdentifierReferenceIDRef_ = partyTradeIdentifierReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 partyTradeIdentifierReference_ = new PartyTradeIdentifierReference(partyTradeIdentifierReferenceNode);
             }
         }
         else
         {
             partyTradeIdentifierReference_ = new PartyTradeIdentifierReference(partyTradeIdentifierReferenceNode);
         }
     }
     
 
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
     XmlNode cashflowAmountNode = xmlNode.SelectSingleNode("cashflowAmount");
     
     if (cashflowAmountNode != null)
     {
         if (cashflowAmountNode.Attributes["href"] != null || cashflowAmountNode.Attributes["id"] != null) 
         {
             if (cashflowAmountNode.Attributes["id"] != null) 
             {
                 cashflowAmountIDRef_ = cashflowAmountNode.Attributes["id"].Value;
                 Money ob = new Money(cashflowAmountNode);
                 IDManager.SetID(cashflowAmountIDRef_, ob);
             }
             else if (cashflowAmountNode.Attributes["href"] != null)
             {
                 cashflowAmountIDRef_ = cashflowAmountNode.Attributes["href"].Value;
             }
             else
             {
                 cashflowAmount_ = new Money(cashflowAmountNode);
             }
         }
         else
         {
             cashflowAmount_ = new Money(cashflowAmountNode);
         }
     }
     
 
     XmlNode cashflowTypeNode = xmlNode.SelectSingleNode("cashflowType");
     
     if (cashflowTypeNode != null)
     {
         if (cashflowTypeNode.Attributes["href"] != null || cashflowTypeNode.Attributes["id"] != null) 
         {
             if (cashflowTypeNode.Attributes["id"] != null) 
             {
                 cashflowTypeIDRef_ = cashflowTypeNode.Attributes["id"].Value;
                 CashflowType ob = new CashflowType(cashflowTypeNode);
                 IDManager.SetID(cashflowTypeIDRef_, ob);
             }
             else if (cashflowTypeNode.Attributes["href"] != null)
             {
                 cashflowTypeIDRef_ = cashflowTypeNode.Attributes["href"].Value;
             }
             else
             {
                 cashflowType_ = new CashflowType(cashflowTypeNode);
             }
         }
         else
         {
             cashflowType_ = new CashflowType(cashflowTypeNode);
         }
     }
     
 
 }
        public GrossCashflow(XmlNode xmlNode)
        {
            XmlNodeList cashflowIdNodeList = xmlNode.SelectNodes("cashflowId");

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

            foreach (XmlNode item in cashflowIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashflowIdIDRef = item.Attributes["id"].Name;
                        CashflowId ob = CashflowId();
                        IDManager.SetID(cashflowIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashflowIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashflowId = new CashflowId(item);
                    }
                }
            }


            XmlNodeList partyTradeIdentifierReferenceNodeList = xmlNode.SelectNodes("partyTradeIdentifierReference");

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

            foreach (XmlNode item in partyTradeIdentifierReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        partyTradeIdentifierReferenceIDRef = item.Attributes["id"].Name;
                        PartyTradeIdentifierReference ob = PartyTradeIdentifierReference();
                        IDManager.SetID(partyTradeIdentifierReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        partyTradeIdentifierReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        partyTradeIdentifierReference = new PartyTradeIdentifierReference(item);
                    }
                }
            }


            XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");

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

            foreach (XmlNode item in payerPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payerPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(payerPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payerPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payerPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");

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

            foreach (XmlNode item in payerAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payerAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(payerAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payerAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payerAccountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");

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

            foreach (XmlNode item in receiverPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(receiverPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        receiverPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        receiverPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");

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

            foreach (XmlNode item in receiverAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(receiverAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        receiverAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        receiverAccountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList cashflowAmountNodeList = xmlNode.SelectNodes("cashflowAmount");

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

            foreach (XmlNode item in cashflowAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashflowAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(cashflowAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashflowAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashflowAmount = new Money(item);
                    }
                }
            }


            XmlNodeList cashflowTypeNodeList = xmlNode.SelectNodes("cashflowType");

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

            foreach (XmlNode item in cashflowTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashflowTypeIDRef = item.Attributes["id"].Name;
                        CashflowType ob = CashflowType();
                        IDManager.SetID(cashflowTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashflowTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashflowType = new CashflowType(item);
                    }
                }
            }
        }
Esempio n. 7
0
        public GrossCashflow(XmlNode xmlNode)
        {
            XmlNode cashflowIdNode = xmlNode.SelectSingleNode("cashflowId");

            if (cashflowIdNode != null)
            {
                if (cashflowIdNode.Attributes["href"] != null || cashflowIdNode.Attributes["id"] != null)
                {
                    if (cashflowIdNode.Attributes["id"] != null)
                    {
                        cashflowIdIDRef_ = cashflowIdNode.Attributes["id"].Value;
                        CashflowId ob = new CashflowId(cashflowIdNode);
                        IDManager.SetID(cashflowIdIDRef_, ob);
                    }
                    else if (cashflowIdNode.Attributes["href"] != null)
                    {
                        cashflowIdIDRef_ = cashflowIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashflowId_ = new CashflowId(cashflowIdNode);
                    }
                }
                else
                {
                    cashflowId_ = new CashflowId(cashflowIdNode);
                }
            }


            XmlNode partyTradeIdentifierReferenceNode = xmlNode.SelectSingleNode("partyTradeIdentifierReference");

            if (partyTradeIdentifierReferenceNode != null)
            {
                if (partyTradeIdentifierReferenceNode.Attributes["href"] != null || partyTradeIdentifierReferenceNode.Attributes["id"] != null)
                {
                    if (partyTradeIdentifierReferenceNode.Attributes["id"] != null)
                    {
                        partyTradeIdentifierReferenceIDRef_ = partyTradeIdentifierReferenceNode.Attributes["id"].Value;
                        PartyTradeIdentifierReference ob = new PartyTradeIdentifierReference(partyTradeIdentifierReferenceNode);
                        IDManager.SetID(partyTradeIdentifierReferenceIDRef_, ob);
                    }
                    else if (partyTradeIdentifierReferenceNode.Attributes["href"] != null)
                    {
                        partyTradeIdentifierReferenceIDRef_ = partyTradeIdentifierReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        partyTradeIdentifierReference_ = new PartyTradeIdentifierReference(partyTradeIdentifierReferenceNode);
                    }
                }
                else
                {
                    partyTradeIdentifierReference_ = new PartyTradeIdentifierReference(partyTradeIdentifierReferenceNode);
                }
            }


            XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");

            if (payerPartyReferenceNode != null)
            {
                if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null)
                {
                    if (payerPartyReferenceNode.Attributes["id"] != null)
                    {
                        payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(payerPartyReferenceNode);
                        IDManager.SetID(payerPartyReferenceIDRef_, ob);
                    }
                    else if (payerPartyReferenceNode.Attributes["href"] != null)
                    {
                        payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
                    }
                }
                else
                {
                    payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
                }
            }


            XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");

            if (payerAccountReferenceNode != null)
            {
                if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null)
                {
                    if (payerAccountReferenceNode.Attributes["id"] != null)
                    {
                        payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(payerAccountReferenceNode);
                        IDManager.SetID(payerAccountReferenceIDRef_, ob);
                    }
                    else if (payerAccountReferenceNode.Attributes["href"] != null)
                    {
                        payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
                    }
                }
                else
                {
                    payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
                }
            }


            XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");

            if (receiverPartyReferenceNode != null)
            {
                if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null)
                {
                    if (receiverPartyReferenceNode.Attributes["id"] != null)
                    {
                        receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                        IDManager.SetID(receiverPartyReferenceIDRef_, ob);
                    }
                    else if (receiverPartyReferenceNode.Attributes["href"] != null)
                    {
                        receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
                    }
                }
                else
                {
                    receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
                }
            }


            XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");

            if (receiverAccountReferenceNode != null)
            {
                if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null)
                {
                    if (receiverAccountReferenceNode.Attributes["id"] != null)
                    {
                        receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                        IDManager.SetID(receiverAccountReferenceIDRef_, ob);
                    }
                    else if (receiverAccountReferenceNode.Attributes["href"] != null)
                    {
                        receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
                    }
                }
                else
                {
                    receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
                }
            }


            XmlNode cashflowAmountNode = xmlNode.SelectSingleNode("cashflowAmount");

            if (cashflowAmountNode != null)
            {
                if (cashflowAmountNode.Attributes["href"] != null || cashflowAmountNode.Attributes["id"] != null)
                {
                    if (cashflowAmountNode.Attributes["id"] != null)
                    {
                        cashflowAmountIDRef_ = cashflowAmountNode.Attributes["id"].Value;
                        Money ob = new Money(cashflowAmountNode);
                        IDManager.SetID(cashflowAmountIDRef_, ob);
                    }
                    else if (cashflowAmountNode.Attributes["href"] != null)
                    {
                        cashflowAmountIDRef_ = cashflowAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashflowAmount_ = new Money(cashflowAmountNode);
                    }
                }
                else
                {
                    cashflowAmount_ = new Money(cashflowAmountNode);
                }
            }


            XmlNode cashflowTypeNode = xmlNode.SelectSingleNode("cashflowType");

            if (cashflowTypeNode != null)
            {
                if (cashflowTypeNode.Attributes["href"] != null || cashflowTypeNode.Attributes["id"] != null)
                {
                    if (cashflowTypeNode.Attributes["id"] != null)
                    {
                        cashflowTypeIDRef_ = cashflowTypeNode.Attributes["id"].Value;
                        CashflowType ob = new CashflowType(cashflowTypeNode);
                        IDManager.SetID(cashflowTypeIDRef_, ob);
                    }
                    else if (cashflowTypeNode.Attributes["href"] != null)
                    {
                        cashflowTypeIDRef_ = cashflowTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashflowType_ = new CashflowType(cashflowTypeNode);
                    }
                }
                else
                {
                    cashflowType_ = new CashflowType(cashflowTypeNode);
                }
            }
        }
 public FxSwapLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode tradeIdentifierReferenceNode = xmlNode.SelectSingleNode("tradeIdentifierReference");
     
     if (tradeIdentifierReferenceNode != null)
     {
         if (tradeIdentifierReferenceNode.Attributes["href"] != null || tradeIdentifierReferenceNode.Attributes["id"] != null) 
         {
             if (tradeIdentifierReferenceNode.Attributes["id"] != null) 
             {
                 tradeIdentifierReferenceIDRef_ = tradeIdentifierReferenceNode.Attributes["id"].Value;
                 PartyTradeIdentifierReference ob = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
                 IDManager.SetID(tradeIdentifierReferenceIDRef_, ob);
             }
             else if (tradeIdentifierReferenceNode.Attributes["href"] != null)
             {
                 tradeIdentifierReferenceIDRef_ = tradeIdentifierReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 tradeIdentifierReference_ = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
             }
         }
         else
         {
             tradeIdentifierReference_ = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
         }
     }
     
 
     XmlNode exchangedCurrency1Node = xmlNode.SelectSingleNode("exchangedCurrency1");
     
     if (exchangedCurrency1Node != null)
     {
         if (exchangedCurrency1Node.Attributes["href"] != null || exchangedCurrency1Node.Attributes["id"] != null) 
         {
             if (exchangedCurrency1Node.Attributes["id"] != null) 
             {
                 exchangedCurrency1IDRef_ = exchangedCurrency1Node.Attributes["id"].Value;
                 Payment ob = new Payment(exchangedCurrency1Node);
                 IDManager.SetID(exchangedCurrency1IDRef_, ob);
             }
             else if (exchangedCurrency1Node.Attributes["href"] != null)
             {
                 exchangedCurrency1IDRef_ = exchangedCurrency1Node.Attributes["href"].Value;
             }
             else
             {
                 exchangedCurrency1_ = new Payment(exchangedCurrency1Node);
             }
         }
         else
         {
             exchangedCurrency1_ = new Payment(exchangedCurrency1Node);
         }
     }
     
 
     XmlNode exchangedCurrency2Node = xmlNode.SelectSingleNode("exchangedCurrency2");
     
     if (exchangedCurrency2Node != null)
     {
         if (exchangedCurrency2Node.Attributes["href"] != null || exchangedCurrency2Node.Attributes["id"] != null) 
         {
             if (exchangedCurrency2Node.Attributes["id"] != null) 
             {
                 exchangedCurrency2IDRef_ = exchangedCurrency2Node.Attributes["id"].Value;
                 Payment ob = new Payment(exchangedCurrency2Node);
                 IDManager.SetID(exchangedCurrency2IDRef_, ob);
             }
             else if (exchangedCurrency2Node.Attributes["href"] != null)
             {
                 exchangedCurrency2IDRef_ = exchangedCurrency2Node.Attributes["href"].Value;
             }
             else
             {
                 exchangedCurrency2_ = new Payment(exchangedCurrency2Node);
             }
         }
         else
         {
             exchangedCurrency2_ = new Payment(exchangedCurrency2Node);
         }
     }
     
 
     XmlNode dealtCurrencyNode = xmlNode.SelectSingleNode("dealtCurrency");
     
     if (dealtCurrencyNode != null)
     {
         if (dealtCurrencyNode.Attributes["href"] != null || dealtCurrencyNode.Attributes["id"] != null) 
         {
             if (dealtCurrencyNode.Attributes["id"] != null) 
             {
                 dealtCurrencyIDRef_ = dealtCurrencyNode.Attributes["id"].Value;
                 DealtCurrencyEnum ob = new DealtCurrencyEnum(dealtCurrencyNode);
                 IDManager.SetID(dealtCurrencyIDRef_, ob);
             }
             else if (dealtCurrencyNode.Attributes["href"] != null)
             {
                 dealtCurrencyIDRef_ = dealtCurrencyNode.Attributes["href"].Value;
             }
             else
             {
                 dealtCurrency_ = new DealtCurrencyEnum(dealtCurrencyNode);
             }
         }
         else
         {
             dealtCurrency_ = new DealtCurrencyEnum(dealtCurrencyNode);
         }
     }
     
 
     XmlNode tenorNameNode = xmlNode.SelectSingleNode("tenorName");
     
     if (tenorNameNode != null)
     {
         if (tenorNameNode.Attributes["href"] != null || tenorNameNode.Attributes["id"] != null) 
         {
             if (tenorNameNode.Attributes["id"] != null) 
             {
                 tenorNameIDRef_ = tenorNameNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(tenorNameNode);
                 IDManager.SetID(tenorNameIDRef_, ob);
             }
             else if (tenorNameNode.Attributes["href"] != null)
             {
                 tenorNameIDRef_ = tenorNameNode.Attributes["href"].Value;
             }
             else
             {
                 tenorName_ = new XsdTypeBoolean(tenorNameNode);
             }
         }
         else
         {
             tenorName_ = new XsdTypeBoolean(tenorNameNode);
         }
     }
     
 
     XmlNode tenorPeriodNode = xmlNode.SelectSingleNode("tenorPeriod");
     
     if (tenorPeriodNode != null)
     {
         if (tenorPeriodNode.Attributes["href"] != null || tenorPeriodNode.Attributes["id"] != null) 
         {
             if (tenorPeriodNode.Attributes["id"] != null) 
             {
                 tenorPeriodIDRef_ = tenorPeriodNode.Attributes["id"].Value;
                 Period ob = new Period(tenorPeriodNode);
                 IDManager.SetID(tenorPeriodIDRef_, ob);
             }
             else if (tenorPeriodNode.Attributes["href"] != null)
             {
                 tenorPeriodIDRef_ = tenorPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 tenorPeriod_ = new Period(tenorPeriodNode);
             }
         }
         else
         {
             tenorPeriod_ = new Period(tenorPeriodNode);
         }
     }
     
 
     XmlNode valueDateNode = xmlNode.SelectSingleNode("valueDate");
     
     if (valueDateNode != null)
     {
         if (valueDateNode.Attributes["href"] != null || valueDateNode.Attributes["id"] != null) 
         {
             if (valueDateNode.Attributes["id"] != null) 
             {
                 valueDateIDRef_ = valueDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(valueDateNode);
                 IDManager.SetID(valueDateIDRef_, ob);
             }
             else if (valueDateNode.Attributes["href"] != null)
             {
                 valueDateIDRef_ = valueDateNode.Attributes["href"].Value;
             }
             else
             {
                 valueDate_ = new XsdTypeDate(valueDateNode);
             }
         }
         else
         {
             valueDate_ = new XsdTypeDate(valueDateNode);
         }
     }
     
 
     XmlNode currency1ValueDateNode = xmlNode.SelectSingleNode("currency1ValueDate");
     
     if (currency1ValueDateNode != null)
     {
         if (currency1ValueDateNode.Attributes["href"] != null || currency1ValueDateNode.Attributes["id"] != null) 
         {
             if (currency1ValueDateNode.Attributes["id"] != null) 
             {
                 currency1ValueDateIDRef_ = currency1ValueDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(currency1ValueDateNode);
                 IDManager.SetID(currency1ValueDateIDRef_, ob);
             }
             else if (currency1ValueDateNode.Attributes["href"] != null)
             {
                 currency1ValueDateIDRef_ = currency1ValueDateNode.Attributes["href"].Value;
             }
             else
             {
                 currency1ValueDate_ = new XsdTypeDate(currency1ValueDateNode);
             }
         }
         else
         {
             currency1ValueDate_ = new XsdTypeDate(currency1ValueDateNode);
         }
     }
     
 
     XmlNode currency2ValueDateNode = xmlNode.SelectSingleNode("currency2ValueDate");
     
     if (currency2ValueDateNode != null)
     {
         if (currency2ValueDateNode.Attributes["href"] != null || currency2ValueDateNode.Attributes["id"] != null) 
         {
             if (currency2ValueDateNode.Attributes["id"] != null) 
             {
                 currency2ValueDateIDRef_ = currency2ValueDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(currency2ValueDateNode);
                 IDManager.SetID(currency2ValueDateIDRef_, ob);
             }
             else if (currency2ValueDateNode.Attributes["href"] != null)
             {
                 currency2ValueDateIDRef_ = currency2ValueDateNode.Attributes["href"].Value;
             }
             else
             {
                 currency2ValueDate_ = new XsdTypeDate(currency2ValueDateNode);
             }
         }
         else
         {
             currency2ValueDate_ = new XsdTypeDate(currency2ValueDateNode);
         }
     }
     
 
     XmlNode exchangeRateNode = xmlNode.SelectSingleNode("exchangeRate");
     
     if (exchangeRateNode != null)
     {
         if (exchangeRateNode.Attributes["href"] != null || exchangeRateNode.Attributes["id"] != null) 
         {
             if (exchangeRateNode.Attributes["id"] != null) 
             {
                 exchangeRateIDRef_ = exchangeRateNode.Attributes["id"].Value;
                 ExchangeRate ob = new ExchangeRate(exchangeRateNode);
                 IDManager.SetID(exchangeRateIDRef_, ob);
             }
             else if (exchangeRateNode.Attributes["href"] != null)
             {
                 exchangeRateIDRef_ = exchangeRateNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeRate_ = new ExchangeRate(exchangeRateNode);
             }
         }
         else
         {
             exchangeRate_ = new ExchangeRate(exchangeRateNode);
         }
     }
     
 
     XmlNode nonDeliverableSettlementNode = xmlNode.SelectSingleNode("nonDeliverableSettlement");
     
     if (nonDeliverableSettlementNode != null)
     {
         if (nonDeliverableSettlementNode.Attributes["href"] != null || nonDeliverableSettlementNode.Attributes["id"] != null) 
         {
             if (nonDeliverableSettlementNode.Attributes["id"] != null) 
             {
                 nonDeliverableSettlementIDRef_ = nonDeliverableSettlementNode.Attributes["id"].Value;
                 FxCashSettlement ob = new FxCashSettlement(nonDeliverableSettlementNode);
                 IDManager.SetID(nonDeliverableSettlementIDRef_, ob);
             }
             else if (nonDeliverableSettlementNode.Attributes["href"] != null)
             {
                 nonDeliverableSettlementIDRef_ = nonDeliverableSettlementNode.Attributes["href"].Value;
             }
             else
             {
                 nonDeliverableSettlement_ = new FxCashSettlement(nonDeliverableSettlementNode);
             }
         }
         else
         {
             nonDeliverableSettlement_ = new FxCashSettlement(nonDeliverableSettlementNode);
         }
     }
     
 
 }
 public GrossCashflow(XmlNode xmlNode)
 {
     XmlNodeList cashflowIdNodeList = xmlNode.SelectNodes("cashflowId");
     if (cashflowIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashflowIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashflowIdIDRef = item.Attributes["id"].Name;
                 CashflowId ob = CashflowId();
                 IDManager.SetID(cashflowIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashflowIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashflowId = new CashflowId(item);
             }
         }
     }
     
 
     XmlNodeList partyTradeIdentifierReferenceNodeList = xmlNode.SelectNodes("partyTradeIdentifierReference");
     if (partyTradeIdentifierReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in partyTradeIdentifierReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyTradeIdentifierReferenceIDRef = item.Attributes["id"].Name;
                 PartyTradeIdentifierReference ob = PartyTradeIdentifierReference();
                 IDManager.SetID(partyTradeIdentifierReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyTradeIdentifierReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 partyTradeIdentifierReference = new PartyTradeIdentifierReference(item);
             }
         }
     }
     
 
     XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");
     if (payerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(payerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");
     if (payerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(payerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");
     if (receiverPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(receiverPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");
     if (receiverAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(receiverAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList cashflowAmountNodeList = xmlNode.SelectNodes("cashflowAmount");
     if (cashflowAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashflowAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashflowAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(cashflowAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashflowAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashflowAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList cashflowTypeNodeList = xmlNode.SelectNodes("cashflowType");
     if (cashflowTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashflowTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashflowTypeIDRef = item.Attributes["id"].Name;
                 CashflowType ob = CashflowType();
                 IDManager.SetID(cashflowTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashflowTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashflowType = new CashflowType(item);
             }
         }
     }
     
 
 }
        public FxSwapLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList tradeIdentifierReferenceNodeList = xmlNode.SelectNodes("tradeIdentifierReference");

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

            foreach (XmlNode item in tradeIdentifierReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tradeIdentifierReferenceIDRef = item.Attributes["id"].Name;
                        PartyTradeIdentifierReference ob = PartyTradeIdentifierReference();
                        IDManager.SetID(tradeIdentifierReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tradeIdentifierReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tradeIdentifierReference = new PartyTradeIdentifierReference(item);
                    }
                }
            }


            XmlNodeList exchangedCurrency1NodeList = xmlNode.SelectNodes("exchangedCurrency1");

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

            foreach (XmlNode item in exchangedCurrency1NodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangedCurrency1IDRef = item.Attributes["id"].Name;
                        Payment ob = Payment();
                        IDManager.SetID(exchangedCurrency1IDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangedCurrency1IDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangedCurrency1 = new Payment(item);
                    }
                }
            }


            XmlNodeList exchangedCurrency2NodeList = xmlNode.SelectNodes("exchangedCurrency2");

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

            foreach (XmlNode item in exchangedCurrency2NodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangedCurrency2IDRef = item.Attributes["id"].Name;
                        Payment ob = Payment();
                        IDManager.SetID(exchangedCurrency2IDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangedCurrency2IDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangedCurrency2 = new Payment(item);
                    }
                }
            }


            XmlNodeList dealtCurrencyNodeList = xmlNode.SelectNodes("dealtCurrency");

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

            foreach (XmlNode item in dealtCurrencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dealtCurrencyIDRef = item.Attributes["id"].Name;
                        DealtCurrencyEnum ob = DealtCurrencyEnum();
                        IDManager.SetID(dealtCurrencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dealtCurrencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dealtCurrency = new DealtCurrencyEnum(item);
                    }
                }
            }


            XmlNodeList tenorNameNodeList = xmlNode.SelectNodes("tenorName");

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

            foreach (XmlNode item in tenorNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tenorNameIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(tenorNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tenorNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tenorName = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList tenorPeriodNodeList = xmlNode.SelectNodes("tenorPeriod");

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

            foreach (XmlNode item in tenorPeriodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tenorPeriodIDRef = item.Attributes["id"].Name;
                        Period ob = Period();
                        IDManager.SetID(tenorPeriodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tenorPeriodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tenorPeriod = new Period(item);
                    }
                }
            }


            XmlNodeList valueDateNodeList = xmlNode.SelectNodes("valueDate");

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

            foreach (XmlNode item in valueDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valueDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(valueDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valueDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valueDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList currency1ValueDateNodeList = xmlNode.SelectNodes("currency1ValueDate");

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

            foreach (XmlNode item in currency1ValueDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        currency1ValueDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(currency1ValueDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        currency1ValueDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        currency1ValueDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList currency2ValueDateNodeList = xmlNode.SelectNodes("currency2ValueDate");

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

            foreach (XmlNode item in currency2ValueDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        currency2ValueDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(currency2ValueDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        currency2ValueDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        currency2ValueDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList exchangeRateNodeList = xmlNode.SelectNodes("exchangeRate");

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

            foreach (XmlNode item in exchangeRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangeRateIDRef = item.Attributes["id"].Name;
                        ExchangeRate ob = ExchangeRate();
                        IDManager.SetID(exchangeRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangeRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangeRate = new ExchangeRate(item);
                    }
                }
            }


            XmlNodeList nonDeliverableSettlementNodeList = xmlNode.SelectNodes("nonDeliverableSettlement");

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

            foreach (XmlNode item in nonDeliverableSettlementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        nonDeliverableSettlementIDRef = item.Attributes["id"].Name;
                        FxCashSettlement ob = FxCashSettlement();
                        IDManager.SetID(nonDeliverableSettlementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        nonDeliverableSettlementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        nonDeliverableSettlement = new FxCashSettlement(item);
                    }
                }
            }
        }
Esempio n. 11
0
        public FxSwapLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode tradeIdentifierReferenceNode = xmlNode.SelectSingleNode("tradeIdentifierReference");

            if (tradeIdentifierReferenceNode != null)
            {
                if (tradeIdentifierReferenceNode.Attributes["href"] != null || tradeIdentifierReferenceNode.Attributes["id"] != null)
                {
                    if (tradeIdentifierReferenceNode.Attributes["id"] != null)
                    {
                        tradeIdentifierReferenceIDRef_ = tradeIdentifierReferenceNode.Attributes["id"].Value;
                        PartyTradeIdentifierReference ob = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
                        IDManager.SetID(tradeIdentifierReferenceIDRef_, ob);
                    }
                    else if (tradeIdentifierReferenceNode.Attributes["href"] != null)
                    {
                        tradeIdentifierReferenceIDRef_ = tradeIdentifierReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tradeIdentifierReference_ = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
                    }
                }
                else
                {
                    tradeIdentifierReference_ = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
                }
            }


            XmlNode exchangedCurrency1Node = xmlNode.SelectSingleNode("exchangedCurrency1");

            if (exchangedCurrency1Node != null)
            {
                if (exchangedCurrency1Node.Attributes["href"] != null || exchangedCurrency1Node.Attributes["id"] != null)
                {
                    if (exchangedCurrency1Node.Attributes["id"] != null)
                    {
                        exchangedCurrency1IDRef_ = exchangedCurrency1Node.Attributes["id"].Value;
                        Payment ob = new Payment(exchangedCurrency1Node);
                        IDManager.SetID(exchangedCurrency1IDRef_, ob);
                    }
                    else if (exchangedCurrency1Node.Attributes["href"] != null)
                    {
                        exchangedCurrency1IDRef_ = exchangedCurrency1Node.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangedCurrency1_ = new Payment(exchangedCurrency1Node);
                    }
                }
                else
                {
                    exchangedCurrency1_ = new Payment(exchangedCurrency1Node);
                }
            }


            XmlNode exchangedCurrency2Node = xmlNode.SelectSingleNode("exchangedCurrency2");

            if (exchangedCurrency2Node != null)
            {
                if (exchangedCurrency2Node.Attributes["href"] != null || exchangedCurrency2Node.Attributes["id"] != null)
                {
                    if (exchangedCurrency2Node.Attributes["id"] != null)
                    {
                        exchangedCurrency2IDRef_ = exchangedCurrency2Node.Attributes["id"].Value;
                        Payment ob = new Payment(exchangedCurrency2Node);
                        IDManager.SetID(exchangedCurrency2IDRef_, ob);
                    }
                    else if (exchangedCurrency2Node.Attributes["href"] != null)
                    {
                        exchangedCurrency2IDRef_ = exchangedCurrency2Node.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangedCurrency2_ = new Payment(exchangedCurrency2Node);
                    }
                }
                else
                {
                    exchangedCurrency2_ = new Payment(exchangedCurrency2Node);
                }
            }


            XmlNode dealtCurrencyNode = xmlNode.SelectSingleNode("dealtCurrency");

            if (dealtCurrencyNode != null)
            {
                if (dealtCurrencyNode.Attributes["href"] != null || dealtCurrencyNode.Attributes["id"] != null)
                {
                    if (dealtCurrencyNode.Attributes["id"] != null)
                    {
                        dealtCurrencyIDRef_ = dealtCurrencyNode.Attributes["id"].Value;
                        DealtCurrencyEnum ob = new DealtCurrencyEnum(dealtCurrencyNode);
                        IDManager.SetID(dealtCurrencyIDRef_, ob);
                    }
                    else if (dealtCurrencyNode.Attributes["href"] != null)
                    {
                        dealtCurrencyIDRef_ = dealtCurrencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dealtCurrency_ = new DealtCurrencyEnum(dealtCurrencyNode);
                    }
                }
                else
                {
                    dealtCurrency_ = new DealtCurrencyEnum(dealtCurrencyNode);
                }
            }


            XmlNode tenorNameNode = xmlNode.SelectSingleNode("tenorName");

            if (tenorNameNode != null)
            {
                if (tenorNameNode.Attributes["href"] != null || tenorNameNode.Attributes["id"] != null)
                {
                    if (tenorNameNode.Attributes["id"] != null)
                    {
                        tenorNameIDRef_ = tenorNameNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(tenorNameNode);
                        IDManager.SetID(tenorNameIDRef_, ob);
                    }
                    else if (tenorNameNode.Attributes["href"] != null)
                    {
                        tenorNameIDRef_ = tenorNameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tenorName_ = new XsdTypeBoolean(tenorNameNode);
                    }
                }
                else
                {
                    tenorName_ = new XsdTypeBoolean(tenorNameNode);
                }
            }


            XmlNode tenorPeriodNode = xmlNode.SelectSingleNode("tenorPeriod");

            if (tenorPeriodNode != null)
            {
                if (tenorPeriodNode.Attributes["href"] != null || tenorPeriodNode.Attributes["id"] != null)
                {
                    if (tenorPeriodNode.Attributes["id"] != null)
                    {
                        tenorPeriodIDRef_ = tenorPeriodNode.Attributes["id"].Value;
                        Period ob = new Period(tenorPeriodNode);
                        IDManager.SetID(tenorPeriodIDRef_, ob);
                    }
                    else if (tenorPeriodNode.Attributes["href"] != null)
                    {
                        tenorPeriodIDRef_ = tenorPeriodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tenorPeriod_ = new Period(tenorPeriodNode);
                    }
                }
                else
                {
                    tenorPeriod_ = new Period(tenorPeriodNode);
                }
            }


            XmlNode valueDateNode = xmlNode.SelectSingleNode("valueDate");

            if (valueDateNode != null)
            {
                if (valueDateNode.Attributes["href"] != null || valueDateNode.Attributes["id"] != null)
                {
                    if (valueDateNode.Attributes["id"] != null)
                    {
                        valueDateIDRef_ = valueDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(valueDateNode);
                        IDManager.SetID(valueDateIDRef_, ob);
                    }
                    else if (valueDateNode.Attributes["href"] != null)
                    {
                        valueDateIDRef_ = valueDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valueDate_ = new XsdTypeDate(valueDateNode);
                    }
                }
                else
                {
                    valueDate_ = new XsdTypeDate(valueDateNode);
                }
            }


            XmlNode currency1ValueDateNode = xmlNode.SelectSingleNode("currency1ValueDate");

            if (currency1ValueDateNode != null)
            {
                if (currency1ValueDateNode.Attributes["href"] != null || currency1ValueDateNode.Attributes["id"] != null)
                {
                    if (currency1ValueDateNode.Attributes["id"] != null)
                    {
                        currency1ValueDateIDRef_ = currency1ValueDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(currency1ValueDateNode);
                        IDManager.SetID(currency1ValueDateIDRef_, ob);
                    }
                    else if (currency1ValueDateNode.Attributes["href"] != null)
                    {
                        currency1ValueDateIDRef_ = currency1ValueDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currency1ValueDate_ = new XsdTypeDate(currency1ValueDateNode);
                    }
                }
                else
                {
                    currency1ValueDate_ = new XsdTypeDate(currency1ValueDateNode);
                }
            }


            XmlNode currency2ValueDateNode = xmlNode.SelectSingleNode("currency2ValueDate");

            if (currency2ValueDateNode != null)
            {
                if (currency2ValueDateNode.Attributes["href"] != null || currency2ValueDateNode.Attributes["id"] != null)
                {
                    if (currency2ValueDateNode.Attributes["id"] != null)
                    {
                        currency2ValueDateIDRef_ = currency2ValueDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(currency2ValueDateNode);
                        IDManager.SetID(currency2ValueDateIDRef_, ob);
                    }
                    else if (currency2ValueDateNode.Attributes["href"] != null)
                    {
                        currency2ValueDateIDRef_ = currency2ValueDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currency2ValueDate_ = new XsdTypeDate(currency2ValueDateNode);
                    }
                }
                else
                {
                    currency2ValueDate_ = new XsdTypeDate(currency2ValueDateNode);
                }
            }


            XmlNode exchangeRateNode = xmlNode.SelectSingleNode("exchangeRate");

            if (exchangeRateNode != null)
            {
                if (exchangeRateNode.Attributes["href"] != null || exchangeRateNode.Attributes["id"] != null)
                {
                    if (exchangeRateNode.Attributes["id"] != null)
                    {
                        exchangeRateIDRef_ = exchangeRateNode.Attributes["id"].Value;
                        ExchangeRate ob = new ExchangeRate(exchangeRateNode);
                        IDManager.SetID(exchangeRateIDRef_, ob);
                    }
                    else if (exchangeRateNode.Attributes["href"] != null)
                    {
                        exchangeRateIDRef_ = exchangeRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeRate_ = new ExchangeRate(exchangeRateNode);
                    }
                }
                else
                {
                    exchangeRate_ = new ExchangeRate(exchangeRateNode);
                }
            }


            XmlNode nonDeliverableSettlementNode = xmlNode.SelectSingleNode("nonDeliverableSettlement");

            if (nonDeliverableSettlementNode != null)
            {
                if (nonDeliverableSettlementNode.Attributes["href"] != null || nonDeliverableSettlementNode.Attributes["id"] != null)
                {
                    if (nonDeliverableSettlementNode.Attributes["id"] != null)
                    {
                        nonDeliverableSettlementIDRef_ = nonDeliverableSettlementNode.Attributes["id"].Value;
                        FxCashSettlement ob = new FxCashSettlement(nonDeliverableSettlementNode);
                        IDManager.SetID(nonDeliverableSettlementIDRef_, ob);
                    }
                    else if (nonDeliverableSettlementNode.Attributes["href"] != null)
                    {
                        nonDeliverableSettlementIDRef_ = nonDeliverableSettlementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        nonDeliverableSettlement_ = new FxCashSettlement(nonDeliverableSettlementNode);
                    }
                }
                else
                {
                    nonDeliverableSettlement_ = new FxCashSettlement(nonDeliverableSettlementNode);
                }
            }
        }