Пример #1
0
        public ReferenceCalculation(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 fixingInformationNode = xmlNode.SelectSingleNode("fixingInformation");

            if (fixingInformationNode != null)
            {
                if (fixingInformationNode.Attributes["href"] != null || fixingInformationNode.Attributes["id"] != null)
                {
                    if (fixingInformationNode.Attributes["id"] != null)
                    {
                        fixingInformationIDRef_ = fixingInformationNode.Attributes["id"].Value;
                        FixingInformation ob = new FixingInformation(fixingInformationNode);
                        IDManager.SetID(fixingInformationIDRef_, ob);
                    }
                    else if (fixingInformationNode.Attributes["href"] != null)
                    {
                        fixingInformationIDRef_ = fixingInformationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingInformation_ = new FixingInformation(fixingInformationNode);
                    }
                }
                else
                {
                    fixingInformation_ = new FixingInformation(fixingInformationNode);
                }
            }


            XmlNode choiceReferenceCalNode = xmlNode.SelectSingleNode("choiceReferenceCal");

            if (choiceReferenceCalNode != null)
            {
                if (choiceReferenceCalNode.Attributes["href"] != null || choiceReferenceCalNode.Attributes["id"] != null)
                {
                    if (choiceReferenceCalNode.Attributes["id"] != null)
                    {
                        choiceReferenceCalIDRef_ = choiceReferenceCalNode.Attributes["id"].Value;
                        ChoiceReferenceCal ob = new ChoiceReferenceCal(choiceReferenceCalNode);
                        IDManager.SetID(choiceReferenceCalIDRef_, ob);
                    }
                    else if (choiceReferenceCalNode.Attributes["href"] != null)
                    {
                        choiceReferenceCalIDRef_ = choiceReferenceCalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        choiceReferenceCal_ = new ChoiceReferenceCal(choiceReferenceCalNode);
                    }
                }
                else
                {
                    choiceReferenceCal_ = new ChoiceReferenceCal(choiceReferenceCalNode);
                }
            }


            XmlNode identityReferenceCalNode = xmlNode.SelectSingleNode("identityReferenceCal");

            if (identityReferenceCalNode != null)
            {
                if (identityReferenceCalNode.Attributes["href"] != null || identityReferenceCalNode.Attributes["id"] != null)
                {
                    if (identityReferenceCalNode.Attributes["id"] != null)
                    {
                        identityReferenceCalIDRef_ = identityReferenceCalNode.Attributes["id"].Value;
                        IdentityReferenceCal ob = new IdentityReferenceCal(identityReferenceCalNode);
                        IDManager.SetID(identityReferenceCalIDRef_, ob);
                    }
                    else if (identityReferenceCalNode.Attributes["href"] != null)
                    {
                        identityReferenceCalIDRef_ = identityReferenceCalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        identityReferenceCal_ = new IdentityReferenceCal(identityReferenceCalNode);
                    }
                }
                else
                {
                    identityReferenceCal_ = new IdentityReferenceCal(identityReferenceCalNode);
                }
            }


            XmlNode maximumReferenceCalNode = xmlNode.SelectSingleNode("maximumReferenceCal");

            if (maximumReferenceCalNode != null)
            {
                if (maximumReferenceCalNode.Attributes["href"] != null || maximumReferenceCalNode.Attributes["id"] != null)
                {
                    if (maximumReferenceCalNode.Attributes["id"] != null)
                    {
                        maximumReferenceCalIDRef_ = maximumReferenceCalNode.Attributes["id"].Value;
                        MaximumReferenceCal ob = new MaximumReferenceCal(maximumReferenceCalNode);
                        IDManager.SetID(maximumReferenceCalIDRef_, ob);
                    }
                    else if (maximumReferenceCalNode.Attributes["href"] != null)
                    {
                        maximumReferenceCalIDRef_ = maximumReferenceCalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        maximumReferenceCal_ = new MaximumReferenceCal(maximumReferenceCalNode);
                    }
                }
                else
                {
                    maximumReferenceCal_ = new MaximumReferenceCal(maximumReferenceCalNode);
                }
            }


            XmlNode minimumReferenceCalNode = xmlNode.SelectSingleNode("minimumReferenceCal");

            if (minimumReferenceCalNode != null)
            {
                if (minimumReferenceCalNode.Attributes["href"] != null || minimumReferenceCalNode.Attributes["id"] != null)
                {
                    if (minimumReferenceCalNode.Attributes["id"] != null)
                    {
                        minimumReferenceCalIDRef_ = minimumReferenceCalNode.Attributes["id"].Value;
                        MinimumReferenceCal ob = new MinimumReferenceCal(minimumReferenceCalNode);
                        IDManager.SetID(minimumReferenceCalIDRef_, ob);
                    }
                    else if (minimumReferenceCalNode.Attributes["href"] != null)
                    {
                        minimumReferenceCalIDRef_ = minimumReferenceCalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        minimumReferenceCal_ = new MinimumReferenceCal(minimumReferenceCalNode);
                    }
                }
                else
                {
                    minimumReferenceCal_ = new MinimumReferenceCal(minimumReferenceCalNode);
                }
            }


            XmlNode refVariableReferenceCalNode = xmlNode.SelectSingleNode("refVariableReferenceCal");

            if (refVariableReferenceCalNode != null)
            {
                if (refVariableReferenceCalNode.Attributes["href"] != null || refVariableReferenceCalNode.Attributes["id"] != null)
                {
                    if (refVariableReferenceCalNode.Attributes["id"] != null)
                    {
                        refVariableReferenceCalIDRef_ = refVariableReferenceCalNode.Attributes["id"].Value;
                        RefVariableReferenceCal ob = new RefVariableReferenceCal(refVariableReferenceCalNode);
                        IDManager.SetID(refVariableReferenceCalIDRef_, ob);
                    }
                    else if (refVariableReferenceCalNode.Attributes["href"] != null)
                    {
                        refVariableReferenceCalIDRef_ = refVariableReferenceCalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        refVariableReferenceCal_ = new RefVariableReferenceCal(refVariableReferenceCalNode);
                    }
                }
                else
                {
                    refVariableReferenceCal_ = new RefVariableReferenceCal(refVariableReferenceCalNode);
                }
            }


            XmlNode dailyReturnReferenceCalNode = xmlNode.SelectSingleNode("dailyReturnReferenceCal");

            if (dailyReturnReferenceCalNode != null)
            {
                if (dailyReturnReferenceCalNode.Attributes["href"] != null || dailyReturnReferenceCalNode.Attributes["id"] != null)
                {
                    if (dailyReturnReferenceCalNode.Attributes["id"] != null)
                    {
                        dailyReturnReferenceCalIDRef_ = dailyReturnReferenceCalNode.Attributes["id"].Value;
                        DailyReturnReferenceCal ob = new DailyReturnReferenceCal(dailyReturnReferenceCalNode);
                        IDManager.SetID(dailyReturnReferenceCalIDRef_, ob);
                    }
                    else if (dailyReturnReferenceCalNode.Attributes["href"] != null)
                    {
                        dailyReturnReferenceCalIDRef_ = dailyReturnReferenceCalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dailyReturnReferenceCal_ = new DailyReturnReferenceCal(dailyReturnReferenceCalNode);
                    }
                }
                else
                {
                    dailyReturnReferenceCal_ = new DailyReturnReferenceCal(dailyReturnReferenceCalNode);
                }
            }


            XmlNode postCalculationNode = xmlNode.SelectSingleNode("postCalculation");

            if (postCalculationNode != null)
            {
                if (postCalculationNode.Attributes["href"] != null || postCalculationNode.Attributes["id"] != null)
                {
                    if (postCalculationNode.Attributes["id"] != null)
                    {
                        postCalculationIDRef_ = postCalculationNode.Attributes["id"].Value;
                        PostCalculation ob = new PostCalculation(postCalculationNode);
                        IDManager.SetID(postCalculationIDRef_, ob);
                    }
                    else if (postCalculationNode.Attributes["href"] != null)
                    {
                        postCalculationIDRef_ = postCalculationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        postCalculation_ = new PostCalculation(postCalculationNode);
                    }
                }
                else
                {
                    postCalculation_ = new PostCalculation(postCalculationNode);
                }
            }


            XmlNode refVariable_referenceValueNode = xmlNode.SelectSingleNode("refVariable_referenceValue");

            if (refVariable_referenceValueNode != null)
            {
                if (refVariable_referenceValueNode.Attributes["href"] != null || refVariable_referenceValueNode.Attributes["id"] != null)
                {
                    if (refVariable_referenceValueNode.Attributes["id"] != null)
                    {
                        refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["id"].Value;
                        RefVariable_referenceValue ob = new RefVariable_referenceValue(refVariable_referenceValueNode);
                        IDManager.SetID(refVariable_referenceValueIDRef_, ob);
                    }
                    else if (refVariable_referenceValueNode.Attributes["href"] != null)
                    {
                        refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode);
                    }
                }
                else
                {
                    refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode);
                }
            }
        }
 public ReferenceCalculation(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 fixingInformationNode = xmlNode.SelectSingleNode("fixingInformation");
     
     if (fixingInformationNode != null)
     {
         if (fixingInformationNode.Attributes["href"] != null || fixingInformationNode.Attributes["id"] != null) 
         {
             if (fixingInformationNode.Attributes["id"] != null) 
             {
                 fixingInformationIDRef_ = fixingInformationNode.Attributes["id"].Value;
                 FixingInformation ob = new FixingInformation(fixingInformationNode);
                 IDManager.SetID(fixingInformationIDRef_, ob);
             }
             else if (fixingInformationNode.Attributes["href"] != null)
             {
                 fixingInformationIDRef_ = fixingInformationNode.Attributes["href"].Value;
             }
             else
             {
                 fixingInformation_ = new FixingInformation(fixingInformationNode);
             }
         }
         else
         {
             fixingInformation_ = new FixingInformation(fixingInformationNode);
         }
     }
     
 
     XmlNode choiceReferenceCalNode = xmlNode.SelectSingleNode("choiceReferenceCal");
     
     if (choiceReferenceCalNode != null)
     {
         if (choiceReferenceCalNode.Attributes["href"] != null || choiceReferenceCalNode.Attributes["id"] != null) 
         {
             if (choiceReferenceCalNode.Attributes["id"] != null) 
             {
                 choiceReferenceCalIDRef_ = choiceReferenceCalNode.Attributes["id"].Value;
                 ChoiceReferenceCal ob = new ChoiceReferenceCal(choiceReferenceCalNode);
                 IDManager.SetID(choiceReferenceCalIDRef_, ob);
             }
             else if (choiceReferenceCalNode.Attributes["href"] != null)
             {
                 choiceReferenceCalIDRef_ = choiceReferenceCalNode.Attributes["href"].Value;
             }
             else
             {
                 choiceReferenceCal_ = new ChoiceReferenceCal(choiceReferenceCalNode);
             }
         }
         else
         {
             choiceReferenceCal_ = new ChoiceReferenceCal(choiceReferenceCalNode);
         }
     }
     
 
     XmlNode identityReferenceCalNode = xmlNode.SelectSingleNode("identityReferenceCal");
     
     if (identityReferenceCalNode != null)
     {
         if (identityReferenceCalNode.Attributes["href"] != null || identityReferenceCalNode.Attributes["id"] != null) 
         {
             if (identityReferenceCalNode.Attributes["id"] != null) 
             {
                 identityReferenceCalIDRef_ = identityReferenceCalNode.Attributes["id"].Value;
                 IdentityReferenceCal ob = new IdentityReferenceCal(identityReferenceCalNode);
                 IDManager.SetID(identityReferenceCalIDRef_, ob);
             }
             else if (identityReferenceCalNode.Attributes["href"] != null)
             {
                 identityReferenceCalIDRef_ = identityReferenceCalNode.Attributes["href"].Value;
             }
             else
             {
                 identityReferenceCal_ = new IdentityReferenceCal(identityReferenceCalNode);
             }
         }
         else
         {
             identityReferenceCal_ = new IdentityReferenceCal(identityReferenceCalNode);
         }
     }
     
 
     XmlNode maximumReferenceCalNode = xmlNode.SelectSingleNode("maximumReferenceCal");
     
     if (maximumReferenceCalNode != null)
     {
         if (maximumReferenceCalNode.Attributes["href"] != null || maximumReferenceCalNode.Attributes["id"] != null) 
         {
             if (maximumReferenceCalNode.Attributes["id"] != null) 
             {
                 maximumReferenceCalIDRef_ = maximumReferenceCalNode.Attributes["id"].Value;
                 MaximumReferenceCal ob = new MaximumReferenceCal(maximumReferenceCalNode);
                 IDManager.SetID(maximumReferenceCalIDRef_, ob);
             }
             else if (maximumReferenceCalNode.Attributes["href"] != null)
             {
                 maximumReferenceCalIDRef_ = maximumReferenceCalNode.Attributes["href"].Value;
             }
             else
             {
                 maximumReferenceCal_ = new MaximumReferenceCal(maximumReferenceCalNode);
             }
         }
         else
         {
             maximumReferenceCal_ = new MaximumReferenceCal(maximumReferenceCalNode);
         }
     }
     
 
     XmlNode minimumReferenceCalNode = xmlNode.SelectSingleNode("minimumReferenceCal");
     
     if (minimumReferenceCalNode != null)
     {
         if (minimumReferenceCalNode.Attributes["href"] != null || minimumReferenceCalNode.Attributes["id"] != null) 
         {
             if (minimumReferenceCalNode.Attributes["id"] != null) 
             {
                 minimumReferenceCalIDRef_ = minimumReferenceCalNode.Attributes["id"].Value;
                 MinimumReferenceCal ob = new MinimumReferenceCal(minimumReferenceCalNode);
                 IDManager.SetID(minimumReferenceCalIDRef_, ob);
             }
             else if (minimumReferenceCalNode.Attributes["href"] != null)
             {
                 minimumReferenceCalIDRef_ = minimumReferenceCalNode.Attributes["href"].Value;
             }
             else
             {
                 minimumReferenceCal_ = new MinimumReferenceCal(minimumReferenceCalNode);
             }
         }
         else
         {
             minimumReferenceCal_ = new MinimumReferenceCal(minimumReferenceCalNode);
         }
     }
     
 
     XmlNode refVariableReferenceCalNode = xmlNode.SelectSingleNode("refVariableReferenceCal");
     
     if (refVariableReferenceCalNode != null)
     {
         if (refVariableReferenceCalNode.Attributes["href"] != null || refVariableReferenceCalNode.Attributes["id"] != null) 
         {
             if (refVariableReferenceCalNode.Attributes["id"] != null) 
             {
                 refVariableReferenceCalIDRef_ = refVariableReferenceCalNode.Attributes["id"].Value;
                 RefVariableReferenceCal ob = new RefVariableReferenceCal(refVariableReferenceCalNode);
                 IDManager.SetID(refVariableReferenceCalIDRef_, ob);
             }
             else if (refVariableReferenceCalNode.Attributes["href"] != null)
             {
                 refVariableReferenceCalIDRef_ = refVariableReferenceCalNode.Attributes["href"].Value;
             }
             else
             {
                 refVariableReferenceCal_ = new RefVariableReferenceCal(refVariableReferenceCalNode);
             }
         }
         else
         {
             refVariableReferenceCal_ = new RefVariableReferenceCal(refVariableReferenceCalNode);
         }
     }
     
 
     XmlNode dailyReturnReferenceCalNode = xmlNode.SelectSingleNode("dailyReturnReferenceCal");
     
     if (dailyReturnReferenceCalNode != null)
     {
         if (dailyReturnReferenceCalNode.Attributes["href"] != null || dailyReturnReferenceCalNode.Attributes["id"] != null) 
         {
             if (dailyReturnReferenceCalNode.Attributes["id"] != null) 
             {
                 dailyReturnReferenceCalIDRef_ = dailyReturnReferenceCalNode.Attributes["id"].Value;
                 DailyReturnReferenceCal ob = new DailyReturnReferenceCal(dailyReturnReferenceCalNode);
                 IDManager.SetID(dailyReturnReferenceCalIDRef_, ob);
             }
             else if (dailyReturnReferenceCalNode.Attributes["href"] != null)
             {
                 dailyReturnReferenceCalIDRef_ = dailyReturnReferenceCalNode.Attributes["href"].Value;
             }
             else
             {
                 dailyReturnReferenceCal_ = new DailyReturnReferenceCal(dailyReturnReferenceCalNode);
             }
         }
         else
         {
             dailyReturnReferenceCal_ = new DailyReturnReferenceCal(dailyReturnReferenceCalNode);
         }
     }
     
 
     XmlNode postCalculationNode = xmlNode.SelectSingleNode("postCalculation");
     
     if (postCalculationNode != null)
     {
         if (postCalculationNode.Attributes["href"] != null || postCalculationNode.Attributes["id"] != null) 
         {
             if (postCalculationNode.Attributes["id"] != null) 
             {
                 postCalculationIDRef_ = postCalculationNode.Attributes["id"].Value;
                 PostCalculation ob = new PostCalculation(postCalculationNode);
                 IDManager.SetID(postCalculationIDRef_, ob);
             }
             else if (postCalculationNode.Attributes["href"] != null)
             {
                 postCalculationIDRef_ = postCalculationNode.Attributes["href"].Value;
             }
             else
             {
                 postCalculation_ = new PostCalculation(postCalculationNode);
             }
         }
         else
         {
             postCalculation_ = new PostCalculation(postCalculationNode);
         }
     }
     
 
     XmlNode refVariable_referenceValueNode = xmlNode.SelectSingleNode("refVariable_referenceValue");
     
     if (refVariable_referenceValueNode != null)
     {
         if (refVariable_referenceValueNode.Attributes["href"] != null || refVariable_referenceValueNode.Attributes["id"] != null) 
         {
             if (refVariable_referenceValueNode.Attributes["id"] != null) 
             {
                 refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["id"].Value;
                 RefVariable_referenceValue ob = new RefVariable_referenceValue(refVariable_referenceValueNode);
                 IDManager.SetID(refVariable_referenceValueIDRef_, ob);
             }
             else if (refVariable_referenceValueNode.Attributes["href"] != null)
             {
                 refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["href"].Value;
             }
             else
             {
                 refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode);
             }
         }
         else
         {
             refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode);
         }
     }
     
 
 }