public Element(int id, string name, TezAttributeTokenType type, ITezAttributeToken parent)
 {
     this.tokenID   = id;
     this.tokenName = name;
     this.tokenType = type;
     if (parent != null)
     {
         this.layer = parent.layer + 1;
     }
     else
     {
         this.layer = 0;
     }
 }
        public static Element createPrimaryElement(string name, TezAttributeTokenType type, ITezAttributeToken parent)
        {
            if (m_PrimaryElementsWithName.ContainsKey(name))
            {
                throw new Exception(string.Format("TezDefinitionSet : this Primary name [{0}] is existed", name));
            }

            var id      = m_PrimaryElements.Count;
            var element = new Element(id, name, type, parent);

            m_PrimaryElements.Add(element);
            m_PrimaryElementsWithName.Add(name, element);
            return(element);
        }
 public Element(int id, string name, TezAttributeTokenType type)
 {
     this.tokenID   = id;
     this.tokenName = name;
     this.tokenType = type;
 }