7 |
|
|
8 |
namespace libxmltv.Core |
namespace libxmltv.Core |
9 |
{ |
{ |
10 |
internal class XMLTVRuntimeInstance : MarshalByRefObject, IXMLTVRuntimeInstance |
[Serializable] |
11 |
|
internal class XMLTVRuntimeInstance : MarshalByRefObject, IXMLTVRuntimeInstance, ISerializer<XMLTVRuntimeInstance> |
12 |
{ |
{ |
13 |
public XMLTVRuntimeInstance(string xmlfile) : this(xmlfile, null) { } |
public XMLTVRuntimeInstance(string xmlfile) : this(xmlfile, null) { } |
14 |
public XMLTVRuntimeInstance(string xmlfile, EventHandler<CancelEventArgs> t) { CreateInstance(xmlfile,t); } |
public XMLTVRuntimeInstance(string xmlfile, EventHandler<CancelEventArgs> t) { CreateInstance(xmlfile,t); } |
15 |
private void CreateInstance(string xmlfile, EventHandler<CancelEventArgs> t) |
private void CreateInstance(string xmlfile, EventHandler<CancelEventArgs> t) |
16 |
{ |
{ |
17 |
CancelEvent = t; |
CancelEvent = t; |
18 |
using (Instance = new XMLTVInstance(xmlfile, this)) |
using (XMLTVInstance instance = new XMLTVInstance(xmlfile, this)) |
19 |
{ |
{ |
20 |
} |
} |
21 |
} |
} |
22 |
|
|
23 |
internal XMLTVInstance Instance { get; private set; } |
//internal XMLTVInstance Instance { get; private set; } |
24 |
|
|
25 |
#region IXMLTV_LOADER members |
#region IXMLTV_LOADER members |
26 |
public System.IO.FileInfo XmlFile { get; set; } |
public System.IO.FileInfo XmlFile { get; set; } |
27 |
public System.Xml.Linq.XDocument XmlDoc { get; set; } |
public string XmlDoc { get; set; } |
28 |
#endregion |
#endregion |
29 |
#region IXMLTV_PARSER Members |
#region IXMLTV_PARSER Members |
30 |
public IXMLTVSource Source { get; set; } |
public IXMLTVSource Source { get; set; } |
32 |
public Dictionary<int, IXMLTVProgram> Programs { get; set; } |
public Dictionary<int, IXMLTVProgram> Programs { get; set; } |
33 |
#endregion |
#endregion |
34 |
|
|
35 |
|
public IXMLTVSerializer<XMLTVRuntimeInstance> Serializer |
36 |
|
{ |
37 |
|
get { return new XMLTVSerializer<XMLTVRuntimeInstance>(this); } |
38 |
|
} |
39 |
//public void Dispose() |
//public void Dispose() |
40 |
//{ |
//{ |
41 |
// IsDisposing = true; |
// IsDisposing = true; |