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