Esempio n. 1
0
        public Instrument(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode headerNode = xmlNode.SelectSingleNode("header");

            if (headerNode != null)
            {
                if (headerNode.Attributes["href"] != null || headerNode.Attributes["id"] != null)
                {
                    if (headerNode.Attributes["id"] != null)
                    {
                        headerIDRef_ = headerNode.Attributes["id"].Value;
                        Header ob = new Header(headerNode);
                        IDManager.SetID(headerIDRef_, ob);
                    }
                    else if (headerNode.Attributes["href"] != null)
                    {
                        headerIDRef_ = headerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        header_ = new Header(headerNode);
                    }
                }
                else
                {
                    header_ = new Header(headerNode);
                }
            }


            XmlNode issueInformationNode = xmlNode.SelectSingleNode("issueInformation");

            if (issueInformationNode != null)
            {
                if (issueInformationNode.Attributes["href"] != null || issueInformationNode.Attributes["id"] != null)
                {
                    if (issueInformationNode.Attributes["id"] != null)
                    {
                        issueInformationIDRef_ = issueInformationNode.Attributes["id"].Value;
                        IssueInformation ob = new IssueInformation(issueInformationNode);
                        IDManager.SetID(issueInformationIDRef_, ob);
                    }
                    else if (issueInformationNode.Attributes["href"] != null)
                    {
                        issueInformationIDRef_ = issueInformationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        issueInformation_ = new IssueInformation(issueInformationNode);
                    }
                }
                else
                {
                    issueInformation_ = new IssueInformation(issueInformationNode);
                }
            }


            XmlNode calculationAgentNode = xmlNode.SelectSingleNode("calculationAgent");

            if (calculationAgentNode != null)
            {
                if (calculationAgentNode.Attributes["href"] != null || calculationAgentNode.Attributes["id"] != null)
                {
                    if (calculationAgentNode.Attributes["id"] != null)
                    {
                        calculationAgentIDRef_ = calculationAgentNode.Attributes["id"].Value;
                        CalculationAgent ob = new CalculationAgent(calculationAgentNode);
                        IDManager.SetID(calculationAgentIDRef_, ob);
                    }
                    else if (calculationAgentNode.Attributes["href"] != null)
                    {
                        calculationAgentIDRef_ = calculationAgentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationAgent_ = new CalculationAgent(calculationAgentNode);
                    }
                }
                else
                {
                    calculationAgent_ = new CalculationAgent(calculationAgentNode);
                }
            }
        }
 public Instrument(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode headerNode = xmlNode.SelectSingleNode("header");
     
     if (headerNode != null)
     {
         if (headerNode.Attributes["href"] != null || headerNode.Attributes["id"] != null) 
         {
             if (headerNode.Attributes["id"] != null) 
             {
                 headerIDRef_ = headerNode.Attributes["id"].Value;
                 Header ob = new Header(headerNode);
                 IDManager.SetID(headerIDRef_, ob);
             }
             else if (headerNode.Attributes["href"] != null)
             {
                 headerIDRef_ = headerNode.Attributes["href"].Value;
             }
             else
             {
                 header_ = new Header(headerNode);
             }
         }
         else
         {
             header_ = new Header(headerNode);
         }
     }
     
 
     XmlNode issueInformationNode = xmlNode.SelectSingleNode("issueInformation");
     
     if (issueInformationNode != null)
     {
         if (issueInformationNode.Attributes["href"] != null || issueInformationNode.Attributes["id"] != null) 
         {
             if (issueInformationNode.Attributes["id"] != null) 
             {
                 issueInformationIDRef_ = issueInformationNode.Attributes["id"].Value;
                 IssueInformation ob = new IssueInformation(issueInformationNode);
                 IDManager.SetID(issueInformationIDRef_, ob);
             }
             else if (issueInformationNode.Attributes["href"] != null)
             {
                 issueInformationIDRef_ = issueInformationNode.Attributes["href"].Value;
             }
             else
             {
                 issueInformation_ = new IssueInformation(issueInformationNode);
             }
         }
         else
         {
             issueInformation_ = new IssueInformation(issueInformationNode);
         }
     }
     
 
     XmlNode calculationAgentNode = xmlNode.SelectSingleNode("calculationAgent");
     
     if (calculationAgentNode != null)
     {
         if (calculationAgentNode.Attributes["href"] != null || calculationAgentNode.Attributes["id"] != null) 
         {
             if (calculationAgentNode.Attributes["id"] != null) 
             {
                 calculationAgentIDRef_ = calculationAgentNode.Attributes["id"].Value;
                 CalculationAgent ob = new CalculationAgent(calculationAgentNode);
                 IDManager.SetID(calculationAgentIDRef_, ob);
             }
             else if (calculationAgentNode.Attributes["href"] != null)
             {
                 calculationAgentIDRef_ = calculationAgentNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAgent_ = new CalculationAgent(calculationAgentNode);
             }
         }
         else
         {
             calculationAgent_ = new CalculationAgent(calculationAgentNode);
         }
     }
     
 
 }