コード例 #1
0
 public InterestLegResetDates(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");
     if (calculationPeriodDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                 InterestLegCalculationPeriodDatesReference ob = InterestLegCalculationPeriodDatesReference();
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesReference = new InterestLegCalculationPeriodDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");
     if (resetRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef = item.Attributes["id"].Name;
                 ResetRelativeToEnum ob = ResetRelativeToEnum();
                 IDManager.SetID(resetRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetRelativeTo = new ResetRelativeToEnum(item);
             }
         }
     }
     
 
     XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");
     if (resetFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef = item.Attributes["id"].Name;
                 ResetFrequency ob = ResetFrequency();
                 IDManager.SetID(resetFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetFrequency = new ResetFrequency(item);
             }
         }
     }
     
 
     XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");
     if (initialFixingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialFixingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(initialFixingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialFixingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialFixingDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");
     if (fixingDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDatesIDRef = item.Attributes["id"].Name;
                 AdjustableDatesOrRelativeDateOffset ob = AdjustableDatesOrRelativeDateOffset();
                 IDManager.SetID(fixingDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDates = new AdjustableDatesOrRelativeDateOffset(item);
             }
         }
     }
     
 
 }
コード例 #2
0
        public InterestLegResetDates(XmlNode xmlNode)
        {
            XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");

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

            foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                        InterestLegCalculationPeriodDatesReference ob = InterestLegCalculationPeriodDatesReference();
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesReference = new InterestLegCalculationPeriodDatesReference(item);
                    }
                }
            }


            XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");

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

            foreach (XmlNode item in resetRelativeToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef = item.Attributes["id"].Name;
                        ResetRelativeToEnum ob = ResetRelativeToEnum();
                        IDManager.SetID(resetRelativeToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetRelativeToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetRelativeTo = new ResetRelativeToEnum(item);
                    }
                }
            }


            XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");

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

            foreach (XmlNode item in resetFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef = item.Attributes["id"].Name;
                        ResetFrequency ob = ResetFrequency();
                        IDManager.SetID(resetFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetFrequency = new ResetFrequency(item);
                    }
                }
            }


            XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");

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

            foreach (XmlNode item in initialFixingDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(initialFixingDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialFixingDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialFixingDate = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");

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

            foreach (XmlNode item in fixingDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingDatesIDRef = item.Attributes["id"].Name;
                        AdjustableDatesOrRelativeDateOffset ob = AdjustableDatesOrRelativeDateOffset();
                        IDManager.SetID(fixingDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingDates = new AdjustableDatesOrRelativeDateOffset(item);
                    }
                }
            }
        }
コード例 #3
0
        public InterestLegResetDates(XmlNode xmlNode)
        {
            XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNode != null)
            {
                if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                        InterestLegCalculationPeriodDatesReference ob = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                }
            }


            XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");

            if (resetRelativeToNode != null)
            {
                if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null)
                {
                    if (resetRelativeToNode.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                        ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                        IDManager.SetID(resetRelativeToIDRef_, ob);
                    }
                    else if (resetRelativeToNode.Attributes["href"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                    }
                }
                else
                {
                    resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                }
            }


            XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");

            if (resetFrequencyNode != null)
            {
                if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null)
                {
                    if (resetFrequencyNode.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                        ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                        IDManager.SetID(resetFrequencyIDRef_, ob);
                    }
                    else if (resetFrequencyNode.Attributes["href"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                    }
                }
                else
                {
                    resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                }
            }


            XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");

            if (initialFixingDateNode != null)
            {
                if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null)
                {
                    if (initialFixingDateNode.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                        IDManager.SetID(initialFixingDateIDRef_, ob);
                    }
                    else if (initialFixingDateNode.Attributes["href"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                    }
                }
                else
                {
                    initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                }
            }


            XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");

            if (fixingDatesNode != null)
            {
                if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null)
                {
                    if (fixingDatesNode.Attributes["id"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                        AdjustableDatesOrRelativeDateOffset ob = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                        IDManager.SetID(fixingDatesIDRef_, ob);
                    }
                    else if (fixingDatesNode.Attributes["href"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                    }
                }
                else
                {
                    fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                }
            }
        }
コード例 #4
0
 public InterestLegResetDates(XmlNode xmlNode)
 {
     XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");
     
     if (calculationPeriodDatesReferenceNode != null)
     {
         if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                 InterestLegCalculationPeriodDatesReference ob = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
         }
     }
     
 
     XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");
     
     if (resetRelativeToNode != null)
     {
         if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null) 
         {
             if (resetRelativeToNode.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                 ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                 IDManager.SetID(resetRelativeToIDRef_, ob);
             }
             else if (resetRelativeToNode.Attributes["href"] != null)
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
             }
         }
         else
         {
             resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
         }
     }
     
 
     XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");
     
     if (resetFrequencyNode != null)
     {
         if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null) 
         {
             if (resetFrequencyNode.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                 ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                 IDManager.SetID(resetFrequencyIDRef_, ob);
             }
             else if (resetFrequencyNode.Attributes["href"] != null)
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 resetFrequency_ = new ResetFrequency(resetFrequencyNode);
             }
         }
         else
         {
             resetFrequency_ = new ResetFrequency(resetFrequencyNode);
         }
     }
     
 
     XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");
     
     if (initialFixingDateNode != null)
     {
         if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null) 
         {
             if (initialFixingDateNode.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                 IDManager.SetID(initialFixingDateIDRef_, ob);
             }
             else if (initialFixingDateNode.Attributes["href"] != null)
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
             }
             else
             {
                 initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
             }
         }
         else
         {
             initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
         }
     }
     
 
     XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");
     
     if (fixingDatesNode != null)
     {
         if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null) 
         {
             if (fixingDatesNode.Attributes["id"] != null) 
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                 AdjustableDatesOrRelativeDateOffset ob = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                 IDManager.SetID(fixingDatesIDRef_, ob);
             }
             else if (fixingDatesNode.Attributes["href"] != null)
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
             }
         }
         else
         {
             fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
         }
     }
     
 
 }