示例#1
0
        public DividendPaymentDate(XmlNode xmlNode)
        {
            XmlNode dividendDateReferenceNode = xmlNode.SelectSingleNode("dividendDateReference");

            if (dividendDateReferenceNode != null)
            {
                if (dividendDateReferenceNode.Attributes["href"] != null || dividendDateReferenceNode.Attributes["id"] != null)
                {
                    if (dividendDateReferenceNode.Attributes["id"] != null)
                    {
                        dividendDateReferenceIDRef_ = dividendDateReferenceNode.Attributes["id"].Value;
                        DividendDateReferenceEnum ob = new DividendDateReferenceEnum(dividendDateReferenceNode);
                        IDManager.SetID(dividendDateReferenceIDRef_, ob);
                    }
                    else if (dividendDateReferenceNode.Attributes["href"] != null)
                    {
                        dividendDateReferenceIDRef_ = dividendDateReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendDateReference_ = new DividendDateReferenceEnum(dividendDateReferenceNode);
                    }
                }
                else
                {
                    dividendDateReference_ = new DividendDateReferenceEnum(dividendDateReferenceNode);
                }
            }


            XmlNode paymentDateOffsetNode = xmlNode.SelectSingleNode("paymentDateOffset");

            if (paymentDateOffsetNode != null)
            {
                if (paymentDateOffsetNode.Attributes["href"] != null || paymentDateOffsetNode.Attributes["id"] != null)
                {
                    if (paymentDateOffsetNode.Attributes["id"] != null)
                    {
                        paymentDateOffsetIDRef_ = paymentDateOffsetNode.Attributes["id"].Value;
                        Offset ob = new Offset(paymentDateOffsetNode);
                        IDManager.SetID(paymentDateOffsetIDRef_, ob);
                    }
                    else if (paymentDateOffsetNode.Attributes["href"] != null)
                    {
                        paymentDateOffsetIDRef_ = paymentDateOffsetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDateOffset_ = new Offset(paymentDateOffsetNode);
                    }
                }
                else
                {
                    paymentDateOffset_ = new Offset(paymentDateOffsetNode);
                }
            }


            XmlNode adjustableDateNode = xmlNode.SelectSingleNode("adjustableDate");

            if (adjustableDateNode != null)
            {
                if (adjustableDateNode.Attributes["href"] != null || adjustableDateNode.Attributes["id"] != null)
                {
                    if (adjustableDateNode.Attributes["id"] != null)
                    {
                        adjustableDateIDRef_ = adjustableDateNode.Attributes["id"].Value;
                        AdjustableDate ob = new AdjustableDate(adjustableDateNode);
                        IDManager.SetID(adjustableDateIDRef_, ob);
                    }
                    else if (adjustableDateNode.Attributes["href"] != null)
                    {
                        adjustableDateIDRef_ = adjustableDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        adjustableDate_ = new AdjustableDate(adjustableDateNode);
                    }
                }
                else
                {
                    adjustableDate_ = new AdjustableDate(adjustableDateNode);
                }
            }
        }
        public DividendPaymentDate(XmlNode xmlNode)
        {
            XmlNodeList dividendDateReferenceNodeList = xmlNode.SelectNodes("dividendDateReference");

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

            foreach (XmlNode item in dividendDateReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendDateReferenceIDRef = item.Attributes["id"].Name;
                        DividendDateReferenceEnum ob = DividendDateReferenceEnum();
                        IDManager.SetID(dividendDateReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendDateReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendDateReference = new DividendDateReferenceEnum(item);
                    }
                }
            }


            XmlNodeList paymentDateOffsetNodeList = xmlNode.SelectNodes("paymentDateOffset");

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

            foreach (XmlNode item in paymentDateOffsetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDateOffsetIDRef = item.Attributes["id"].Name;
                        Offset ob = Offset();
                        IDManager.SetID(paymentDateOffsetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDateOffsetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDateOffset = new Offset(item);
                    }
                }
            }


            XmlNodeList adjustableDateNodeList = xmlNode.SelectNodes("adjustableDate");

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

            foreach (XmlNode item in adjustableDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        adjustableDateIDRef = item.Attributes["id"].Name;
                        AdjustableDate ob = AdjustableDate();
                        IDManager.SetID(adjustableDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        adjustableDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        adjustableDate = new AdjustableDate(item);
                    }
                }
            }
        }
 public DividendPaymentDate(XmlNode xmlNode)
 {
     XmlNode dividendDateReferenceNode = xmlNode.SelectSingleNode("dividendDateReference");
     
     if (dividendDateReferenceNode != null)
     {
         if (dividendDateReferenceNode.Attributes["href"] != null || dividendDateReferenceNode.Attributes["id"] != null) 
         {
             if (dividendDateReferenceNode.Attributes["id"] != null) 
             {
                 dividendDateReferenceIDRef_ = dividendDateReferenceNode.Attributes["id"].Value;
                 DividendDateReferenceEnum ob = new DividendDateReferenceEnum(dividendDateReferenceNode);
                 IDManager.SetID(dividendDateReferenceIDRef_, ob);
             }
             else if (dividendDateReferenceNode.Attributes["href"] != null)
             {
                 dividendDateReferenceIDRef_ = dividendDateReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 dividendDateReference_ = new DividendDateReferenceEnum(dividendDateReferenceNode);
             }
         }
         else
         {
             dividendDateReference_ = new DividendDateReferenceEnum(dividendDateReferenceNode);
         }
     }
     
 
     XmlNode paymentDateOffsetNode = xmlNode.SelectSingleNode("paymentDateOffset");
     
     if (paymentDateOffsetNode != null)
     {
         if (paymentDateOffsetNode.Attributes["href"] != null || paymentDateOffsetNode.Attributes["id"] != null) 
         {
             if (paymentDateOffsetNode.Attributes["id"] != null) 
             {
                 paymentDateOffsetIDRef_ = paymentDateOffsetNode.Attributes["id"].Value;
                 Offset ob = new Offset(paymentDateOffsetNode);
                 IDManager.SetID(paymentDateOffsetIDRef_, ob);
             }
             else if (paymentDateOffsetNode.Attributes["href"] != null)
             {
                 paymentDateOffsetIDRef_ = paymentDateOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDateOffset_ = new Offset(paymentDateOffsetNode);
             }
         }
         else
         {
             paymentDateOffset_ = new Offset(paymentDateOffsetNode);
         }
     }
     
 
     XmlNode adjustableDateNode = xmlNode.SelectSingleNode("adjustableDate");
     
     if (adjustableDateNode != null)
     {
         if (adjustableDateNode.Attributes["href"] != null || adjustableDateNode.Attributes["id"] != null) 
         {
             if (adjustableDateNode.Attributes["id"] != null) 
             {
                 adjustableDateIDRef_ = adjustableDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(adjustableDateNode);
                 IDManager.SetID(adjustableDateIDRef_, ob);
             }
             else if (adjustableDateNode.Attributes["href"] != null)
             {
                 adjustableDateIDRef_ = adjustableDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustableDate_ = new AdjustableDate(adjustableDateNode);
             }
         }
         else
         {
             adjustableDate_ = new AdjustableDate(adjustableDateNode);
         }
     }
     
 
 }