Example #1
0
        public void AddTagDef(TagDef tagdef)
        {
            var tags = Root.Elements(Namespace + "TagDef");

            if (tags?.Any() == true)
            {
                var tag = tags.FirstOrDefault(e => e.Attribute("symbol").Value == tagdef.Symbol);
                if (tag != null)
                {
                    return;
                }
            }

            Root.AddFirst(tagdef);
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance from the given TagDef element
 /// </summary>
 /// <param name="element"></param>
 public TagDefMapping(XElement element)
 {
     Element       = element;
     TagDef        = new TagDef(element);
     OriginalIndex = TagDef.Index;
 }