1 |
william |
22 |
using System; |
2 |
|
|
using System.Collections.Generic; |
3 |
|
|
using System.Linq; |
4 |
|
|
using System.Text; |
5 |
|
|
using libxmltv.Interfaces; |
6 |
|
|
|
7 |
|
|
namespace libxmltv.Core |
8 |
|
|
{ |
9 |
|
|
/// <summary> |
10 |
|
|
/// Main class: Creates the XMLTV Loader |
11 |
|
|
/// </summary> |
12 |
|
|
public static class XMLTV |
13 |
|
|
{ |
14 |
|
|
static XMLTV() { XMLTV_LOGGER.Initialize(); } |
15 |
|
|
public static object CreateLoader(string xml_file) |
16 |
|
|
{ |
17 |
|
|
XMLTV_LOADER loader = new XMLTV_LOADER(xml_file); |
18 |
|
|
return loader; |
19 |
|
|
} |
20 |
|
|
public static object CreateParser(object xmltv) |
21 |
|
|
{ |
22 |
|
|
XMLTV_PARSER parser = new XMLTV_PARSER(xmltv); |
23 |
|
|
return parser; |
24 |
|
|
} |
25 |
william |
23 |
|
26 |
|
|
public static IXMLTV_PARSER GetParser(object xmltv) |
27 |
|
|
{ |
28 |
|
|
IXMLTV_PARSER _xmltv; |
29 |
|
|
if (!Internals.VerifyInstance<IXMLTV_PARSER>(xmltv, out _xmltv)) { return null; } |
30 |
|
|
return _xmltv; |
31 |
|
|
} |
32 |
william |
22 |
} |
33 |
|
|
} |