ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/xmltv_parser/trunk/libxmltv/Core/XMLTVInstance.cs
(Generate patch)

Comparing trunk/libxmltv/Core/XMLTVInstance.cs (file contents):
Revision 43 by william, Fri Mar 8 02:13:59 2013 UTC vs.
Revision 44 by william, Fri Mar 8 03:36:44 2013 UTC

# Line 6 | Line 6 | using libxmltv.Interfaces;
6  
7   namespace libxmltv.Core
8   {
9 <    internal class XMLTVRuntimeInstance : MarshalByRefObject, IXMLTVRuntimeInstance
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); }
# Line 21 | Line 21 | namespace libxmltv.Core
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
33 >    internal class XMLTVInstance : IDisposable
34      {
35          public XMLTVInstance(string xmlfile, XMLTVRuntimeInstance instance)
36          {
# Line 33 | Line 40 | namespace libxmltv.Core
40  
41          private void CreateLoader(string xml_file, XMLTVRuntimeInstance instance)
42          {
43 <            XMLTVLoader loader = new XMLTVLoader(xml_file, instance);
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);
48 >            //XMLTVParser parser = new XMLTVParser(instance);
49 >            XMLTVParser.CreateInstance(instance);
50 >        }
51 >
52 >        public void Dispose()
53 >        {
54 >            //throw new NotImplementedException();
55          }
56      }
57   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines