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);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <param name="disposing"> </param>
        protected virtual void Dispose(bool disposing)
        {
            Trace.WriteLine("EventListLoader was disposed, disposing = {0}", disposing.ToString());

            if (_disposed)
            {
                return;
            }
            if (disposing && _channelData != null)
            {
                _channelData.Dispose();
            }

            _disposed = true;
        }