コード例 #1
0
 public ReferenceCurve(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode typeNode = xmlNode.SelectSingleNode("type");
     
     if (typeNode != null)
     {
         if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) 
         {
             if (typeNode.Attributes["id"] != null) 
             {
                 typeIDRef_ = typeNode.Attributes["id"].Value;
                 XsdTypeToken ob = new XsdTypeToken(typeNode);
                 IDManager.SetID(typeIDRef_, ob);
             }
             else if (typeNode.Attributes["href"] != null)
             {
                 typeIDRef_ = typeNode.Attributes["href"].Value;
             }
             else
             {
                 type_ = new XsdTypeToken(typeNode);
             }
         }
         else
         {
             type_ = new XsdTypeToken(typeNode);
         }
     }
     
 
     XmlNode cdsSpreadTermstructureNode = xmlNode.SelectSingleNode("cdsSpreadTermstructure");
     
     if (cdsSpreadTermstructureNode != null)
     {
         if (cdsSpreadTermstructureNode.Attributes["href"] != null || cdsSpreadTermstructureNode.Attributes["id"] != null) 
         {
             if (cdsSpreadTermstructureNode.Attributes["id"] != null) 
             {
                 cdsSpreadTermstructureIDRef_ = cdsSpreadTermstructureNode.Attributes["id"].Value;
                 CdsSpreadTermstructure ob = new CdsSpreadTermstructure(cdsSpreadTermstructureNode);
                 IDManager.SetID(cdsSpreadTermstructureIDRef_, ob);
             }
             else if (cdsSpreadTermstructureNode.Attributes["href"] != null)
             {
                 cdsSpreadTermstructureIDRef_ = cdsSpreadTermstructureNode.Attributes["href"].Value;
             }
             else
             {
                 cdsSpreadTermstructure_ = new CdsSpreadTermstructure(cdsSpreadTermstructureNode);
             }
         }
         else
         {
             cdsSpreadTermstructure_ = new CdsSpreadTermstructure(cdsSpreadTermstructureNode);
         }
     }
     
 
     XmlNode yieldTermstructureNode = xmlNode.SelectSingleNode("yieldTermstructure");
     
     if (yieldTermstructureNode != null)
     {
         if (yieldTermstructureNode.Attributes["href"] != null || yieldTermstructureNode.Attributes["id"] != null) 
         {
             if (yieldTermstructureNode.Attributes["id"] != null) 
             {
                 yieldTermstructureIDRef_ = yieldTermstructureNode.Attributes["id"].Value;
                 YieldTermstructure ob = new YieldTermstructure(yieldTermstructureNode);
                 IDManager.SetID(yieldTermstructureIDRef_, ob);
             }
             else if (yieldTermstructureNode.Attributes["href"] != null)
             {
                 yieldTermstructureIDRef_ = yieldTermstructureNode.Attributes["href"].Value;
             }
             else
             {
                 yieldTermstructure_ = new YieldTermstructure(yieldTermstructureNode);
             }
         }
         else
         {
             yieldTermstructure_ = new YieldTermstructure(yieldTermstructureNode);
         }
     }
     
 
 }
コード例 #2
0
        public ReferenceCurve(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode typeNode = xmlNode.SelectSingleNode("type");

            if (typeNode != null)
            {
                if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null)
                {
                    if (typeNode.Attributes["id"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["id"].Value;
                        XsdTypeToken ob = new XsdTypeToken(typeNode);
                        IDManager.SetID(typeIDRef_, ob);
                    }
                    else if (typeNode.Attributes["href"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        type_ = new XsdTypeToken(typeNode);
                    }
                }
                else
                {
                    type_ = new XsdTypeToken(typeNode);
                }
            }


            XmlNode cdsSpreadTermstructureNode = xmlNode.SelectSingleNode("cdsSpreadTermstructure");

            if (cdsSpreadTermstructureNode != null)
            {
                if (cdsSpreadTermstructureNode.Attributes["href"] != null || cdsSpreadTermstructureNode.Attributes["id"] != null)
                {
                    if (cdsSpreadTermstructureNode.Attributes["id"] != null)
                    {
                        cdsSpreadTermstructureIDRef_ = cdsSpreadTermstructureNode.Attributes["id"].Value;
                        CdsSpreadTermstructure ob = new CdsSpreadTermstructure(cdsSpreadTermstructureNode);
                        IDManager.SetID(cdsSpreadTermstructureIDRef_, ob);
                    }
                    else if (cdsSpreadTermstructureNode.Attributes["href"] != null)
                    {
                        cdsSpreadTermstructureIDRef_ = cdsSpreadTermstructureNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cdsSpreadTermstructure_ = new CdsSpreadTermstructure(cdsSpreadTermstructureNode);
                    }
                }
                else
                {
                    cdsSpreadTermstructure_ = new CdsSpreadTermstructure(cdsSpreadTermstructureNode);
                }
            }


            XmlNode yieldTermstructureNode = xmlNode.SelectSingleNode("yieldTermstructure");

            if (yieldTermstructureNode != null)
            {
                if (yieldTermstructureNode.Attributes["href"] != null || yieldTermstructureNode.Attributes["id"] != null)
                {
                    if (yieldTermstructureNode.Attributes["id"] != null)
                    {
                        yieldTermstructureIDRef_ = yieldTermstructureNode.Attributes["id"].Value;
                        YieldTermstructure ob = new YieldTermstructure(yieldTermstructureNode);
                        IDManager.SetID(yieldTermstructureIDRef_, ob);
                    }
                    else if (yieldTermstructureNode.Attributes["href"] != null)
                    {
                        yieldTermstructureIDRef_ = yieldTermstructureNode.Attributes["href"].Value;
                    }
                    else
                    {
                        yieldTermstructure_ = new YieldTermstructure(yieldTermstructureNode);
                    }
                }
                else
                {
                    yieldTermstructure_ = new YieldTermstructure(yieldTermstructureNode);
                }
            }
        }