/[xmltv_parser]/trunk/libxmltv/Core/XMLTVRuntimeInstance.cs
ViewVC logotype

Contents of /trunk/libxmltv/Core/XMLTVRuntimeInstance.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 44 - (show annotations) (download)
Fri Mar 8 03:36:44 2013 UTC (7 years, 6 months ago) by william
Original Path: trunk/libxmltv/Core/XMLTVInstance.cs
File size: 1946 byte(s)

1 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 internal class XMLTVRuntimeInstance : MarshalByRefObject, IXMLTVRuntimeInstance, IDisposable
10 {
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
25 public void Dispose()
26 {
27 IsDisposing = true;
28 //throw new NotImplementedException();
29 }
30 public bool IsDisposing { get; private set; }
31 }
32
33 internal class XMLTVInstance : IDisposable
34 {
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 //XMLTVLoader loader = new XMLTVLoader(xml_file, instance);
44 XMLTVLoader.CreateInstance(xml_file, instance);
45 }
46 private void CreateParser(XMLTVRuntimeInstance instance)
47 {
48 //XMLTVParser parser = new XMLTVParser(instance);
49 XMLTVParser.CreateInstance(instance);
50 }
51
52 public void Dispose()
53 {
54 //throw new NotImplementedException();
55 }
56 }
57 }

  ViewVC Help
Powered by ViewVC 1.1.22