Represents a release group.
Exemplo n.º 1
0
        private ReleaseGroup ParseReleaseGroup(XElement el)
        {
            string id    = string.Empty;
            string title = string.Empty;
            string type  = string.Empty;

            XElement element = el.Element("id");

            if (element != null)
            {
                id = element.Value;
            }

            element = el.Element("title");

            if (element != null)
            {
                title = element.Value;
            }

            element = el.Element("type");

            if (element != null)
            {
                type = element.Value;
            }

            var releasegroup = new ReleaseGroup(id, title, type);

            element = el.Element("artists");

            if (element != null)
            {
                var list = element.Elements("artist");

                foreach (var item in list)
                {
                    releasegroup.Artists.Add(ParseArtist(item));
                }
            }

            return(releasegroup);
        }
Exemplo n.º 2
0
        private ReleaseGroup ParseReleaseGroup(XElement node)
        {
            string id, type, title;

            TryParseChild(node, "id", out id);
            TryParseChild(node, "type", out type);
            TryParseChild(node, "title", out title);

            var releasegroup = new ReleaseGroup(id, title, type);

            var e = node.Element("artists");

            if (e != null)
            {
                var list = e.Elements("artist");

                foreach (var item in list)
                {
                    releasegroup.Artists.Add(ParseArtist(item));
                }
            }

            return(releasegroup);
        }
Exemplo n.º 3
0
        private ReleaseGroup ParseReleaseGroup(XElement el)
        {
            string id = String.Empty;
            string title = String.Empty;
            string type = String.Empty;

            XElement element = el.Element("id");

            if (element != null)
            {
                id = element.Value;
            }

            element = el.Element("title");

            if (element != null)
            {
                title = element.Value;
            }

            element = el.Element("type");

            if (element != null)
            {
                type = element.Value;
            }

            var releasegroup = new ReleaseGroup(id, title, type);

            element = el.Element("artists");

            if (element != null)
            {
                var list = element.Elements("artist");

                foreach (var item in list)
                {
                    releasegroup.Artists.Add(ParseArtist(item));
                }
            }

            return releasegroup;
        }
Exemplo n.º 4
0
        private ReleaseGroup ParseReleaseGroup(XElement node)
        {
            string id, type, title;

            TryParseChild(node, "id", out id);
            TryParseChild(node, "type", out type);
            TryParseChild(node, "title", out title);
            
            var releasegroup = new ReleaseGroup(id, title, type);

            var e = node.Element("artists");

            if (e != null)
            {
                var list = e.Elements("artist");

                foreach (var item in list)
                {
                    releasegroup.Artists.Add(ParseArtist(item));
                }
            }

            return releasegroup;
        }