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

Diff of /trunk/libxmltv/Core/XMLTVInstance.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 36 by william, Fri Mar 8 02:13:59 2013 UTC revision 44 by william, Fri Mar 8 03:36:44 2013 UTC
# Line 6  using libxmltv.Interfaces; Line 6  using libxmltv.Interfaces;
6    
7  namespace libxmltv.Core  namespace libxmltv.Core
8  {  {
9      internal class XMLTVRuntimeInstance : MarshalByRefObject, IXMLTVRuntimeInstance      internal class XMLTVRuntimeInstance : MarshalByRefObject, IXMLTVRuntimeInstance, IDisposable
10      {      {
11          public XMLTVRuntimeInstance(string xmlfile) { CreateInstance(xmlfile); }          public XMLTVRuntimeInstance(string xmlfile) { CreateInstance(xmlfile); }
12          private void CreateInstance(string xmlfile) { Instance = new XMLTVInstance(xmlfile, this); }          private void CreateInstance(string xmlfile) { Instance = new XMLTVInstance(xmlfile, this); }
# Line 21  namespace libxmltv.Core Line 21  namespace libxmltv.Core
21          public Dictionary<string, IXMLTVChannel> Channels { get; set; }          public Dictionary<string, IXMLTVChannel> Channels { get; set; }
22          public Dictionary<int, IXMLTVProgram> Programs { get; set; }          public Dictionary<int, IXMLTVProgram> Programs { get; set; }
23          #endregion            #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      internal class XMLTVInstance : IDisposable
34      {      {
35          public XMLTVInstance(string xmlfile, XMLTVRuntimeInstance instance)          public XMLTVInstance(string xmlfile, XMLTVRuntimeInstance instance)
36          {          {
# Line 33  namespace libxmltv.Core Line 40  namespace libxmltv.Core
40    
41          private void CreateLoader(string xml_file, XMLTVRuntimeInstance instance)          private void CreateLoader(string xml_file, XMLTVRuntimeInstance instance)
42          {          {
43              XMLTVLoader loader = new XMLTVLoader(xml_file, instance);              //XMLTVLoader loader = new XMLTVLoader(xml_file, instance);
44                XMLTVLoader.CreateInstance(xml_file, instance);
45          }          }
46          private void CreateParser(XMLTVRuntimeInstance instance)          private void CreateParser(XMLTVRuntimeInstance instance)
47          {          {
48              XMLTVParser parser = new XMLTVParser(instance);              //XMLTVParser parser = new XMLTVParser(instance);
49                XMLTVParser.CreateInstance(instance);
50            }
51    
52            public void Dispose()
53            {
54                //throw new NotImplementedException();
55          }          }
56      }      }
57  }  }

Legend:
Removed from v.36  
changed lines
  Added in v.44

  ViewVC Help
Powered by ViewVC 1.1.22