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); } |
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 |
{ |
{ |
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 |
} |
} |