Load() 정적인 개인적인 메소드

static private Load ( System.Xml.Linq.XElement xmlElement ) : Entry
xmlElement System.Xml.Linq.XElement
리턴 Entry
        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);
        }
예제 #2
0
        public List <Entry> GetListOrSetOfEmbEntry()
        {
            var q = from element in _xmlData.Elements()
                    select Entry.Load(element);

            return(q.ToList());
        }
예제 #3
0
        public List <Entry> GetEntryListValue()
        {
            var q = from element in _xmlData.Elements()
                    let entry = Entry.Load(element)
                                select entry;

            return(q.ToList());
        }