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); } }
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); } }