ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/xmltv_parser/trunk/libxmltv/Core/XMLTVInstance.cs
Revision: 44
Committed: Fri Mar 8 03:36:44 2013 UTC (10 years, 9 months ago) by william
File size: 1946 byte(s)
Log Message:

File Contents

# User Rev Content
1 william 36 using System;
2     using System.Collections.Generic;
3     using System.Linq;
4     using System.Text;
5     using libxmltv.Interfaces;
6    
7     namespace libxmltv.Core
8     {
9 william 44 internal class XMLTVRuntimeInstance : MarshalByRefObject, IXMLTVRuntimeInstance, IDisposable
10 william 36 {
11     public XMLTVRuntimeInstance(string xmlfile) { CreateInstance(xmlfile); }
12     private void CreateInstance(string xmlfile) { Instance = new XMLTVInstance(xmlfile, this); }
13     internal XMLTVInstance Instance { get; private set; }
14    
15     #region IXMLTV_LOADER members
16     public System.IO.FileInfo XmlFile { get; set; }
17     public System.Xml.Linq.XDocument XmlDoc { get; set; }
18     #endregion
19     #region IXMLTV_PARSER Members
20     public IXMLTVSource Source { get; set; }
21     public Dictionary<string, IXMLTVChannel> Channels { get; set; }
22     public Dictionary<int, IXMLTVProgram> Programs { get; set; }
23     #endregion
24 william 44
25     public void Dispose()
26     {
27     IsDisposing = true;
28     //throw new NotImplementedException();
29     }
30     public bool IsDisposing { get; private set; }
31 william 36 }
32    
33 william 44 internal class XMLTVInstance : IDisposable
34 william 36 {
35     public XMLTVInstance(string xmlfile, XMLTVRuntimeInstance instance)
36     {
37     CreateLoader(xmlfile, instance);
38     CreateParser(instance);
39     }
40    
41     private void CreateLoader(string xml_file, XMLTVRuntimeInstance instance)
42     {
43 william 44 //XMLTVLoader loader = new XMLTVLoader(xml_file, instance);
44     XMLTVLoader.CreateInstance(xml_file, instance);
45 william 36 }
46     private void CreateParser(XMLTVRuntimeInstance instance)
47     {
48 william 44 //XMLTVParser parser = new XMLTVParser(instance);
49     XMLTVParser.CreateInstance(instance);
50 william 36 }
51 william 44
52     public void Dispose()
53     {
54     //throw new NotImplementedException();
55     }
56 william 36 }
57     }