Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="bypassCache"></param>
        /// <param name="contentLocation"></param>
        /// <returns></returns>
        public virtual DataSet LoadPlaylist(bool bypassCache, string contentLocation)
        {
            _reader = GetItem(_reader);

            if ((bypassCache) || (_reader == null))
            {
                using (_reader)
                {
                    _reader = LoadContentFromXml(); // XmlReader.Create(Resources.DIPlaylistXml, _readerSettings);
                }

                base.InsertItem(_reader);
            }

            _channelData = GetItem(_channelData);

            if ((bypassCache) || (_channelData == null))
            {
                using (_channelData = new ChannelData())
                {
                    try
                    {
                        _channelData.ReadXml(_reader);

                        base.InsertItem(_channelData);
                    }
                    finally
                    {
                        _channelData.Dispose();
                    }
                }
            }

            return(_channelData);
        }