示例#1
0
文件: EcuLoc.cs 项目: Merp/SharpTune
 public EcuLoc(XElement xe)
 {
     ecuRefCandidates = new Dictionary<int, EcuLocCandidate>();
     name = xe.Attribute("name").Value.ToString();
     if (xe.Attribute("type") != null)
         dataType = xe.Attribute("type").Value.ToString();
     else
         dataType = null;
     IEnumerable<XElement> te = xe.Elements();
     ecuRefCandidates.Add(0,new EcuLocCandidate(name));
     foreach (var xi in xe.Elements())
     {
         EcuLocCandidate tid = new EcuLocCandidate(xi);
         ecuRefCandidates.Add(tid.priority, tid);
     }
 }
示例#2
0
        public EcuLoc(XElement xe)
        {
            ecuRefCandidates = new Dictionary <int, EcuLocCandidate>();
            name             = xe.Attribute("name").Value.ToString();
            if (xe.Attribute("type") != null)
            {
                dataType = xe.Attribute("type").Value.ToString();
            }
            else
            {
                dataType = null;
            }
            IEnumerable <XElement> te = xe.Elements();

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