コード例 #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
ファイル: EcuLoc.cs プロジェクト: tapickell/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);
            }
        }