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

Diff of /trunk/libxmltv/Core/XMLTVRuntimeInstance.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 45 by william, Fri Mar 8 03:41:18 2013 UTC
# Line 9  namespace libxmltv.Core Line 9  namespace libxmltv.Core
9      internal class XMLTVRuntimeInstance : MarshalByRefObject, IXMLTVRuntimeInstance      internal class XMLTVRuntimeInstance : MarshalByRefObject, IXMLTVRuntimeInstance
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)
13            {
14                using (Instance = new XMLTVInstance(xmlfile, this))
15                {
16                }
17            }
18          internal XMLTVInstance Instance { get; private set; }          internal XMLTVInstance Instance { get; private set; }
19    
20          #region IXMLTV_LOADER members          #region IXMLTV_LOADER members
# Line 21  namespace libxmltv.Core Line 26  namespace libxmltv.Core
26          public Dictionary<string, IXMLTVChannel> Channels { get; set; }          public Dictionary<string, IXMLTVChannel> Channels { get; set; }
27          public Dictionary<int, IXMLTVProgram> Programs { get; set; }          public Dictionary<int, IXMLTVProgram> Programs { get; set; }
28          #endregion            #endregion  
29        
30            //public void Dispose()
31            //{
32            //    IsDisposing = true;
33            //    //throw new NotImplementedException();
34            //}
35            public bool IsDisposing { get; private set; }
36      }      }
37    
38      internal class XMLTVInstance      internal class XMLTVInstance : IDisposable
39      {      {
40          public XMLTVInstance(string xmlfile, XMLTVRuntimeInstance instance)          public XMLTVInstance(string xmlfile, XMLTVRuntimeInstance instance)
41          {          {
# Line 33  namespace libxmltv.Core Line 45  namespace libxmltv.Core
45    
46          private void CreateLoader(string xml_file, XMLTVRuntimeInstance instance)          private void CreateLoader(string xml_file, XMLTVRuntimeInstance instance)
47          {          {
48              XMLTVLoader loader = new XMLTVLoader(xml_file, instance);              //XMLTVLoader loader = new XMLTVLoader(xml_file, instance);
49                XMLTVLoader.CreateInstance(xml_file, instance);
50          }          }
51          private void CreateParser(XMLTVRuntimeInstance instance)          private void CreateParser(XMLTVRuntimeInstance instance)
52          {          {
53              XMLTVParser parser = new XMLTVParser(instance);              //XMLTVParser parser = new XMLTVParser(instance);
54                XMLTVParser.CreateInstance(instance);
55            }
56    
57            public void Dispose()
58            {
59                //throw new NotImplementedException();
60          }          }
61      }      }
62  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.22