static private Load ( System.Xml.Linq.XElement xmlElement ) : |
||
xmlElement | System.Xml.Linq.XElement | |
Résultat |
public static DeployitManifest Load(XDocument xmlData) { var root = xmlData.Root; if (root == null) { throw new ArgumentException("Manifest has no root node"); } if (root.Name != "udm.DeploymentPackage") { throw new ArgumentException("invalid root xml node"); } var result = new DeployitManifest { ApplicationName = root.Attribute("application").ValueOrEmptyIfNull(), Version = root.Attribute("version").ValueOrEmptyIfNull() }; var deployables = root.Element("deployables"); if (deployables == null) { return(result); } foreach (var deployable in deployables.Elements()) { result.Entries.Add(Entry.Load(deployable)); } return(result); }
public List <Entry> GetListOrSetOfEmbEntry() { var q = from element in _xmlData.Elements() select Entry.Load(element); return(q.ToList()); }
public List <Entry> GetEntryListValue() { var q = from element in _xmlData.Elements() let entry = Entry.Load(element) select entry; return(q.ToList()); }