Пример #1
0
 public Define(XElement xe)
 {
     idaDefs = new Dictionary<int, IdaDef>();
     name = xe.Attribute("name").Value.ToString();
     if (xe.Attribute("type") != null)
         type = xe.Attribute("type").Value.ToString();
     else
         type = null;
     IEnumerable<XElement> te = xe.Elements();
     idaDefs.Add(0,new IdaDef(name));
     foreach (var xi in xe.Elements())
     {
         IdaDef tid = new IdaDef(xi);
         idaDefs.Add(tid.priority, tid);
     }
 }
Пример #2
0
        public Define(XElement xe)
        {
            idaDefs = new Dictionary <int, IdaDef>();
            name    = xe.Attribute("name").Value.ToString();
            if (xe.Attribute("type") != null)
            {
                type = xe.Attribute("type").Value.ToString();
            }
            else
            {
                type = null;
            }
            IEnumerable <XElement> te = xe.Elements();

            idaDefs.Add(0, new IdaDef(name));
            foreach (var xi in xe.Elements())
            {
                IdaDef tid = new IdaDef(xi);
                idaDefs.Add(tid.priority, tid);
            }
        }