/[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 06:15:44	50
+++ trunk/libxmltv/Core/XMLTV.cs	2013/03/08 06:39:56	51
@@ -62,7 +62,19 @@
 
         private CLASS instance;
         #region IXMLTV<T> members
-        private IXMLTVSerializer<INTERFACE> CreateSerializer() { return new XMLTVSerializer<INTERFACE>(instance); }
+        public IXMLTVSerializer<CLASS> CreateSerializer() 
+        {
+            // we must serialize on the CLASS type, using the INTERFACE type is syntatically incorrect
+            ISerializer<CLASS> class_serializer = (instance as ISerializer<CLASS>);
+            if (class_serializer != null)
+            {
+                return class_serializer.Serializer;
+            }
+            else
+            {
+                return new XMLTVSerializer<CLASS>(instance);
+            }
+        }
         public INTERFACE GetInstance()
         {
             return (INTERFACE)instance;

 

  ViewVC Help
Powered by ViewVC 1.1.22