2010-07-12 Astushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System.XML / System.Xml.Serialization / SerializationCodeGeneratorConfiguration.cs
index 7f05e6b5ce957c3010ccea562639bdeaa65d71a0..d2e2f47f40c6c132a1caba6c1db231321525ea8c 100644 (file)
@@ -55,6 +55,21 @@ namespace System.Xml.Serialization
                
                [XmlElement ("writer")]
                public string WriterClassName;
+       
+               [XmlElement ("baseSerializer")]
+               public string BaseSerializerClassName;
+       
+               [XmlElement ("implementation")]
+               public string ImplementationClassName;
+       
+               [XmlElement ("noreader")]
+               public bool NoReader;
+               
+               [XmlElement ("nowriter")]
+               public bool NoWriter;
+               
+               [XmlElement ("generateAsInternal")]
+               public bool GenerateAsInternal;
                
                [XmlElement ("namespace")]
                public string Namespace;
@@ -75,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)
@@ -165,12 +182,6 @@ namespace System.Xml.Serialization
                public string TypeMember;
        }
        
-       internal enum HookDir
-       {
-               Read,
-               Write
-       }
-       
        internal enum HookAction
        {
                InsertBefore,