ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/xmltv_parser/trunk/libxmltv/Core/XMLTV.cs
(Generate patch)

Comparing trunk/libxmltv/Core/XMLTV.cs (file contents):
Revision 50 by william, Fri Mar 8 06:15:44 2013 UTC vs.
Revision 51 by william, Fri Mar 8 06:39:56 2013 UTC

# Line 62 | Line 62 | namespace libxmltv.Core
62  
63          private CLASS instance;
64          #region IXMLTV<T> members
65 <        private IXMLTVSerializer<INTERFACE> CreateSerializer() { return new XMLTVSerializer<INTERFACE>(instance); }
65 >        public IXMLTVSerializer<CLASS> CreateSerializer()
66 >        {
67 >            // we must serialize on the CLASS type, using the INTERFACE type is syntatically incorrect
68 >            ISerializer<CLASS> class_serializer = (instance as ISerializer<CLASS>);
69 >            if (class_serializer != null)
70 >            {
71 >                return class_serializer.Serializer;
72 >            }
73 >            else
74 >            {
75 >                return new XMLTVSerializer<CLASS>(instance);
76 >            }
77 >        }
78          public INTERFACE GetInstance()
79          {
80              return (INTERFACE)instance;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines