2010-07-12 Astushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System.XML / System.Xml.Serialization / SerializationCodeGeneratorConfiguration.cs
index e69d2934d95997c7932d6f64fac53c2eaaa52e2c..d2e2f47f40c6c132a1caba6c1db231321525ea8c 100644 (file)
@@ -56,6 +56,12 @@ namespace System.Xml.Serialization
                [XmlElement ("writer")]
                public string WriterClassName;
        
+               [XmlElement ("baseSerializer")]
+               public string BaseSerializerClassName;
+       
+               [XmlElement ("implementation")]
+               public string ImplementationClassName;
+       
                [XmlElement ("noreader")]
                public bool NoReader;
                
@@ -84,12 +90,14 @@ namespace System.Xml.Serialization
                [XmlArray ("writerHooks")]
                public Hook[] WriterHooks;
                
-               public ArrayList GetHooks (HookType hookType, HookDir dir, HookAction action, Type type, string member)
+               public ArrayList GetHooks (HookType hookType, XmlMappingAccess dir, HookAction action, Type type, string member)
                {
-                       if (dir == HookDir.Read)
+                       if ((dir & XmlMappingAccess.Read) != 0)
                                return FindHook (ReaderHooks, hookType, action, type, member);
-                       else
+                       if ((dir & XmlMappingAccess.Write) != 0)
                                return FindHook (WriterHooks, hookType, action, type, member);
+                       else
+                               throw new Exception ("INTERNAL ERROR");
                }
                
                ArrayList FindHook (Hook[] hooks, HookType hookType, HookAction action, Type type, string member)
@@ -174,12 +182,6 @@ namespace System.Xml.Serialization
                public string TypeMember;
        }
        
-       internal enum HookDir
-       {
-               Read,
-               Write
-       }
-       
        internal enum HookAction
        {
                InsertBefore,