コード例 #1
0
        public NthDefaultTrait(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 nthNode = xmlNode.SelectSingleNode("nth");

            if (nthNode != null)
            {
                if (nthNode.Attributes["href"] != null || nthNode.Attributes["id"] != null)
                {
                    if (nthNode.Attributes["id"] != null)
                    {
                        nthIDRef_ = nthNode.Attributes["id"].Value;
                        XsdTypeInt ob = new XsdTypeInt(nthNode);
                        IDManager.SetID(nthIDRef_, ob);
                    }
                    else if (nthNode.Attributes["href"] != null)
                    {
                        nthIDRef_ = nthNode.Attributes["href"].Value;
                    }
                    else
                    {
                        nth_ = new XsdTypeInt(nthNode);
                    }
                }
                else
                {
                    nth_ = new XsdTypeInt(nthNode);
                }
            }


            XmlNode correlationNode = xmlNode.SelectSingleNode("correlation");

            if (correlationNode != null)
            {
                if (correlationNode.Attributes["href"] != null || correlationNode.Attributes["id"] != null)
                {
                    if (correlationNode.Attributes["id"] != null)
                    {
                        correlationIDRef_ = correlationNode.Attributes["id"].Value;
                        XsdTypeDouble ob = new XsdTypeDouble(correlationNode);
                        IDManager.SetID(correlationIDRef_, ob);
                    }
                    else if (correlationNode.Attributes["href"] != null)
                    {
                        correlationIDRef_ = correlationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        correlation_ = new XsdTypeDouble(correlationNode);
                    }
                }
                else
                {
                    correlation_ = new XsdTypeDouble(correlationNode);
                }
            }
        }
コード例 #2
0
 public NthDefaultTrait(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 nthNode = xmlNode.SelectSingleNode("nth");
     
     if (nthNode != null)
     {
         if (nthNode.Attributes["href"] != null || nthNode.Attributes["id"] != null) 
         {
             if (nthNode.Attributes["id"] != null) 
             {
                 nthIDRef_ = nthNode.Attributes["id"].Value;
                 XsdTypeInt ob = new XsdTypeInt(nthNode);
                 IDManager.SetID(nthIDRef_, ob);
             }
             else if (nthNode.Attributes["href"] != null)
             {
                 nthIDRef_ = nthNode.Attributes["href"].Value;
             }
             else
             {
                 nth_ = new XsdTypeInt(nthNode);
             }
         }
         else
         {
             nth_ = new XsdTypeInt(nthNode);
         }
     }
     
 
     XmlNode correlationNode = xmlNode.SelectSingleNode("correlation");
     
     if (correlationNode != null)
     {
         if (correlationNode.Attributes["href"] != null || correlationNode.Attributes["id"] != null) 
         {
             if (correlationNode.Attributes["id"] != null) 
             {
                 correlationIDRef_ = correlationNode.Attributes["id"].Value;
                 XsdTypeDouble ob = new XsdTypeDouble(correlationNode);
                 IDManager.SetID(correlationIDRef_, ob);
             }
             else if (correlationNode.Attributes["href"] != null)
             {
                 correlationIDRef_ = correlationNode.Attributes["href"].Value;
             }
             else
             {
                 correlation_ = new XsdTypeDouble(correlationNode);
             }
         }
         else
         {
             correlation_ = new XsdTypeDouble(correlationNode);
         }
     }
     
 
 }