RaumfeldNET.MediaItem_Track.initValuesFromXMLNode C# (CSharp) Method

initValuesFromXMLNode() public method

public initValuesFromXMLNode ( XmlNode _nodeItem, XmlNamespaceManager _manager ) : void
_nodeItem System.Xml.XmlNode
_manager System.Xml.XmlNamespaceManager
return void
        public override void initValuesFromXMLNode(XmlNode _nodeItem, XmlNamespaceManager _manager)
        {
            String duration;
            String convertString;

            base.initValuesFromXMLNode(_nodeItem, _manager);

            this.title = xmlDocumentHelper.getChildNodeValue(_nodeItem, "dc:title", _manager);
            if (String.IsNullOrWhiteSpace(this.title))
                this.title = "Unbekannter Titel";
            if (this.title == "Unavailable Resource")
            {
                this.itemStatus = MediaItemStatus.Unavailable;
                return;
            }
            convertString= xmlDocumentHelper.getChildNodeValue(_nodeItem, "upnp:originalTrackNumber", _manager);
            if (!String.IsNullOrWhiteSpace(convertString))
                this.trackNrFormatted = convertString;
            duration = xmlDocumentHelper.getChildNodeAttributeValue(_nodeItem, "ns:res", "duration", _manager);
            if (!String.IsNullOrWhiteSpace(duration))
            {
                TimeSpan timeSpan;
                TimeSpan.TryParse(duration, out timeSpan);
                this.duration = Convert.ToUInt16(timeSpan.Days * 68400 + timeSpan.Hours * 3600 + timeSpan.Minutes * 60 + timeSpan.Seconds);
            }
        }