コード例 #1
0
 public PayoffInfo(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 preDefinedVariableListNode = xmlNode.SelectSingleNode("preDefinedVariableList");
     
     if (preDefinedVariableListNode != null)
     {
         if (preDefinedVariableListNode.Attributes["href"] != null || preDefinedVariableListNode.Attributes["id"] != null) 
         {
             if (preDefinedVariableListNode.Attributes["id"] != null) 
             {
                 preDefinedVariableListIDRef_ = preDefinedVariableListNode.Attributes["id"].Value;
                 PreDefinedVariableList ob = new PreDefinedVariableList(preDefinedVariableListNode);
                 IDManager.SetID(preDefinedVariableListIDRef_, ob);
             }
             else if (preDefinedVariableListNode.Attributes["href"] != null)
             {
                 preDefinedVariableListIDRef_ = preDefinedVariableListNode.Attributes["href"].Value;
             }
             else
             {
                 preDefinedVariableList_ = new PreDefinedVariableList(preDefinedVariableListNode);
             }
         }
         else
         {
             preDefinedVariableList_ = new PreDefinedVariableList(preDefinedVariableListNode);
         }
     }
     
 
     XmlNode stopLossPayoffNode = xmlNode.SelectSingleNode("stopLossPayoff");
     
     if (stopLossPayoffNode != null)
     {
         if (stopLossPayoffNode.Attributes["href"] != null || stopLossPayoffNode.Attributes["id"] != null) 
         {
             if (stopLossPayoffNode.Attributes["id"] != null) 
             {
                 stopLossPayoffIDRef_ = stopLossPayoffNode.Attributes["id"].Value;
                 StopLossPayoff ob = new StopLossPayoff(stopLossPayoffNode);
                 IDManager.SetID(stopLossPayoffIDRef_, ob);
             }
             else if (stopLossPayoffNode.Attributes["href"] != null)
             {
                 stopLossPayoffIDRef_ = stopLossPayoffNode.Attributes["href"].Value;
             }
             else
             {
                 stopLossPayoff_ = new StopLossPayoff(stopLossPayoffNode);
             }
         }
         else
         {
             stopLossPayoff_ = new StopLossPayoff(stopLossPayoffNode);
         }
     }
     
 
     XmlNode vanillaPayoffNode = xmlNode.SelectSingleNode("vanillaPayoff");
     
     if (vanillaPayoffNode != null)
     {
         if (vanillaPayoffNode.Attributes["href"] != null || vanillaPayoffNode.Attributes["id"] != null) 
         {
             if (vanillaPayoffNode.Attributes["id"] != null) 
             {
                 vanillaPayoffIDRef_ = vanillaPayoffNode.Attributes["id"].Value;
                 VanillaPayoff ob = new VanillaPayoff(vanillaPayoffNode);
                 IDManager.SetID(vanillaPayoffIDRef_, ob);
             }
             else if (vanillaPayoffNode.Attributes["href"] != null)
             {
                 vanillaPayoffIDRef_ = vanillaPayoffNode.Attributes["href"].Value;
             }
             else
             {
                 vanillaPayoff_ = new VanillaPayoff(vanillaPayoffNode);
             }
         }
         else
         {
             vanillaPayoff_ = new VanillaPayoff(vanillaPayoffNode);
         }
     }
     
 
     XmlNode compositeSumOptionPayoffNode = xmlNode.SelectSingleNode("compositeSumOptionPayoff");
     
     if (compositeSumOptionPayoffNode != null)
     {
         if (compositeSumOptionPayoffNode.Attributes["href"] != null || compositeSumOptionPayoffNode.Attributes["id"] != null) 
         {
             if (compositeSumOptionPayoffNode.Attributes["id"] != null) 
             {
                 compositeSumOptionPayoffIDRef_ = compositeSumOptionPayoffNode.Attributes["id"].Value;
                 CompositeSumOptionPayoff ob = new CompositeSumOptionPayoff(compositeSumOptionPayoffNode);
                 IDManager.SetID(compositeSumOptionPayoffIDRef_, ob);
             }
             else if (compositeSumOptionPayoffNode.Attributes["href"] != null)
             {
                 compositeSumOptionPayoffIDRef_ = compositeSumOptionPayoffNode.Attributes["href"].Value;
             }
             else
             {
                 compositeSumOptionPayoff_ = new CompositeSumOptionPayoff(compositeSumOptionPayoffNode);
             }
         }
         else
         {
             compositeSumOptionPayoff_ = new CompositeSumOptionPayoff(compositeSumOptionPayoffNode);
         }
     }
     
 
     XmlNode autoCallablePayoffNode = xmlNode.SelectSingleNode("autoCallablePayoff");
     
     if (autoCallablePayoffNode != null)
     {
         if (autoCallablePayoffNode.Attributes["href"] != null || autoCallablePayoffNode.Attributes["id"] != null) 
         {
             if (autoCallablePayoffNode.Attributes["id"] != null) 
             {
                 autoCallablePayoffIDRef_ = autoCallablePayoffNode.Attributes["id"].Value;
                 AutoCallablePayoff ob = new AutoCallablePayoff(autoCallablePayoffNode);
                 IDManager.SetID(autoCallablePayoffIDRef_, ob);
             }
             else if (autoCallablePayoffNode.Attributes["href"] != null)
             {
                 autoCallablePayoffIDRef_ = autoCallablePayoffNode.Attributes["href"].Value;
             }
             else
             {
                 autoCallablePayoff_ = new AutoCallablePayoff(autoCallablePayoffNode);
             }
         }
         else
         {
             autoCallablePayoff_ = new AutoCallablePayoff(autoCallablePayoffNode);
         }
     }
     
 
 }
コード例 #2
0
        public PayoffInfo(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 preDefinedVariableListNode = xmlNode.SelectSingleNode("preDefinedVariableList");

            if (preDefinedVariableListNode != null)
            {
                if (preDefinedVariableListNode.Attributes["href"] != null || preDefinedVariableListNode.Attributes["id"] != null)
                {
                    if (preDefinedVariableListNode.Attributes["id"] != null)
                    {
                        preDefinedVariableListIDRef_ = preDefinedVariableListNode.Attributes["id"].Value;
                        PreDefinedVariableList ob = new PreDefinedVariableList(preDefinedVariableListNode);
                        IDManager.SetID(preDefinedVariableListIDRef_, ob);
                    }
                    else if (preDefinedVariableListNode.Attributes["href"] != null)
                    {
                        preDefinedVariableListIDRef_ = preDefinedVariableListNode.Attributes["href"].Value;
                    }
                    else
                    {
                        preDefinedVariableList_ = new PreDefinedVariableList(preDefinedVariableListNode);
                    }
                }
                else
                {
                    preDefinedVariableList_ = new PreDefinedVariableList(preDefinedVariableListNode);
                }
            }


            XmlNode stopLossPayoffNode = xmlNode.SelectSingleNode("stopLossPayoff");

            if (stopLossPayoffNode != null)
            {
                if (stopLossPayoffNode.Attributes["href"] != null || stopLossPayoffNode.Attributes["id"] != null)
                {
                    if (stopLossPayoffNode.Attributes["id"] != null)
                    {
                        stopLossPayoffIDRef_ = stopLossPayoffNode.Attributes["id"].Value;
                        StopLossPayoff ob = new StopLossPayoff(stopLossPayoffNode);
                        IDManager.SetID(stopLossPayoffIDRef_, ob);
                    }
                    else if (stopLossPayoffNode.Attributes["href"] != null)
                    {
                        stopLossPayoffIDRef_ = stopLossPayoffNode.Attributes["href"].Value;
                    }
                    else
                    {
                        stopLossPayoff_ = new StopLossPayoff(stopLossPayoffNode);
                    }
                }
                else
                {
                    stopLossPayoff_ = new StopLossPayoff(stopLossPayoffNode);
                }
            }


            XmlNode vanillaPayoffNode = xmlNode.SelectSingleNode("vanillaPayoff");

            if (vanillaPayoffNode != null)
            {
                if (vanillaPayoffNode.Attributes["href"] != null || vanillaPayoffNode.Attributes["id"] != null)
                {
                    if (vanillaPayoffNode.Attributes["id"] != null)
                    {
                        vanillaPayoffIDRef_ = vanillaPayoffNode.Attributes["id"].Value;
                        VanillaPayoff ob = new VanillaPayoff(vanillaPayoffNode);
                        IDManager.SetID(vanillaPayoffIDRef_, ob);
                    }
                    else if (vanillaPayoffNode.Attributes["href"] != null)
                    {
                        vanillaPayoffIDRef_ = vanillaPayoffNode.Attributes["href"].Value;
                    }
                    else
                    {
                        vanillaPayoff_ = new VanillaPayoff(vanillaPayoffNode);
                    }
                }
                else
                {
                    vanillaPayoff_ = new VanillaPayoff(vanillaPayoffNode);
                }
            }


            XmlNode compositeSumOptionPayoffNode = xmlNode.SelectSingleNode("compositeSumOptionPayoff");

            if (compositeSumOptionPayoffNode != null)
            {
                if (compositeSumOptionPayoffNode.Attributes["href"] != null || compositeSumOptionPayoffNode.Attributes["id"] != null)
                {
                    if (compositeSumOptionPayoffNode.Attributes["id"] != null)
                    {
                        compositeSumOptionPayoffIDRef_ = compositeSumOptionPayoffNode.Attributes["id"].Value;
                        CompositeSumOptionPayoff ob = new CompositeSumOptionPayoff(compositeSumOptionPayoffNode);
                        IDManager.SetID(compositeSumOptionPayoffIDRef_, ob);
                    }
                    else if (compositeSumOptionPayoffNode.Attributes["href"] != null)
                    {
                        compositeSumOptionPayoffIDRef_ = compositeSumOptionPayoffNode.Attributes["href"].Value;
                    }
                    else
                    {
                        compositeSumOptionPayoff_ = new CompositeSumOptionPayoff(compositeSumOptionPayoffNode);
                    }
                }
                else
                {
                    compositeSumOptionPayoff_ = new CompositeSumOptionPayoff(compositeSumOptionPayoffNode);
                }
            }


            XmlNode autoCallablePayoffNode = xmlNode.SelectSingleNode("autoCallablePayoff");

            if (autoCallablePayoffNode != null)
            {
                if (autoCallablePayoffNode.Attributes["href"] != null || autoCallablePayoffNode.Attributes["id"] != null)
                {
                    if (autoCallablePayoffNode.Attributes["id"] != null)
                    {
                        autoCallablePayoffIDRef_ = autoCallablePayoffNode.Attributes["id"].Value;
                        AutoCallablePayoff ob = new AutoCallablePayoff(autoCallablePayoffNode);
                        IDManager.SetID(autoCallablePayoffIDRef_, ob);
                    }
                    else if (autoCallablePayoffNode.Attributes["href"] != null)
                    {
                        autoCallablePayoffIDRef_ = autoCallablePayoffNode.Attributes["href"].Value;
                    }
                    else
                    {
                        autoCallablePayoff_ = new AutoCallablePayoff(autoCallablePayoffNode);
                    }
                }
                else
                {
                    autoCallablePayoff_ = new AutoCallablePayoff(autoCallablePayoffNode);
                }
            }
        }