using System; using System.Collections.Generic; using System.Linq; using System.Text; using libxmltv.Interfaces; namespace libxmltv.Core { internal class XMLTVRuntimeInstance : MarshalByRefObject, IXMLTVRuntimeInstance, IDisposable { public XMLTVRuntimeInstance(string xmlfile) { CreateInstance(xmlfile); } private void CreateInstance(string xmlfile) { Instance = new XMLTVInstance(xmlfile, this); } internal XMLTVInstance Instance { get; private set; } #region IXMLTV_LOADER members public System.IO.FileInfo XmlFile { get; set; } public System.Xml.Linq.XDocument XmlDoc { get; set; } #endregion #region IXMLTV_PARSER Members public IXMLTVSource Source { get; set; } public Dictionary Channels { get; set; } public Dictionary Programs { get; set; } #endregion public void Dispose() { IsDisposing = true; //throw new NotImplementedException(); } public bool IsDisposing { get; private set; } } internal class XMLTVInstance : IDisposable { public XMLTVInstance(string xmlfile, XMLTVRuntimeInstance instance) { CreateLoader(xmlfile, instance); CreateParser(instance); } private void CreateLoader(string xml_file, XMLTVRuntimeInstance instance) { //XMLTVLoader loader = new XMLTVLoader(xml_file, instance); XMLTVLoader.CreateInstance(xml_file, instance); } private void CreateParser(XMLTVRuntimeInstance instance) { //XMLTVParser parser = new XMLTVParser(instance); XMLTVParser.CreateInstance(instance); } public void Dispose() { //throw new NotImplementedException(); } } }