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

Diff of /trunk/libxmltv/Core/XMLTV.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/libxmltv/Core/XMLTV.cs	2013/03/08 04:01:25	46
+++ trunk/libxmltv/Core/XMLTV.cs	2013/03/08 05:20:12	49
@@ -14,31 +14,13 @@
     {
         static XMLTV() { xmltv_logger.Initialize(); }
 
-
-        public static IXMLTVRuntimeInstance CreateInstance(string xml_file) { return CreateInstance(xml_file, null); }
-        public static IXMLTVRuntimeInstance CreateInstance(string xml_file, EventHandler<CancelEventArgs> t) { return new XMLTVRuntimeInstance(xml_file,t); }
-        //private static void CreateLoader(string xml_file, out XMLTVRuntimeInstance xmltv)
-        //{
-        //    //XMLTV_LOADER loader = new XMLTV_LOADER(xml_file);
-        //    //return loader;
-        //    //XMLTVRuntimeInstance instance = CreateInstance(xml_file);
-        //    //return instance;
-        //    //xmltv = CreateInstance(xml_file);
-        //    xmltv = null;
-        //}
-        //private static void CreateParser(out XMLTVRuntimeInstance xmltv)
-        //{
-        //    //XMLTV_PARSER parser = new XMLTV_PARSER(xmltv);
-        //    //return parser;
-        //    xmltv = null;
-        //}
-
-        ////private static IXMLTV_PARSER GetParser(object xmltv)
-        ////{
-        ////    IXMLTV_PARSER _xmltv;
-        ////    if (!Internals.VerifyInstance<IXMLTV_PARSER>(xmltv, out _xmltv)) { return null; }
-        ////    return _xmltv;
-        ////}
+        private static XMLTVRuntimeInstance instance;
+        public static IXMLTVRuntimeInstance GetInstance() { return InternalGetInstance(); }
+        internal static XMLTVRuntimeInstance InternalGetInstance() { return instance; }
+        public static void CreateInstance(string xml_file) { CreateInstance(xml_file, null); }
+        public static void CreateInstance(string xml_file, EventHandler<CancelEventArgs> t) { instance = new XMLTVRuntimeInstance(xml_file, t); }
+        public static IXMLTVSerializer<IXMLTVRuntimeInstance> GetSerializer() {return InternalGetInstance().Serializer; }
     }
 }
 
+

 

  ViewVC Help
Powered by ViewVC 1.1.22