Merge pull request #1275 from ranma42/fix-lib64
[mono.git] / mcs / class / System.XML / System.Xml.Serialization / SerializationSource.cs
index 1a10b2b00143ce674b687fa6227c1ce560299b2c..d905a22ae79e539865a50b39b2f3c7dd5d510f20 100644 (file)
@@ -54,7 +54,7 @@ namespace System.Xml.Serialization
                        if (includedTypes == null)
                                return other.includedTypes == null;
                        
-                       if (includedTypes.Length != other.includedTypes.Length) return false;
+                       if (other.includedTypes == null || includedTypes.Length != other.includedTypes.Length) return false;
                        for (int n=0; n<includedTypes.Length; n++)
                                if (!includedTypes[n].Equals (other.includedTypes[n])) return false;
 
@@ -148,7 +148,7 @@ namespace System.Xml.Serialization
                string elementName;
                bool hasWrapperElement;
                string membersHash;
-               bool writeAccessors;
+//             bool writeAccessors;
                bool literalFormat;
                
                public MembersSerializationSource (string elementName, bool hasWrapperElement, XmlReflectionMember [] members, bool writeAccessors, 
@@ -157,7 +157,7 @@ namespace System.Xml.Serialization
                {
                        this.elementName = elementName;
                        this.hasWrapperElement = hasWrapperElement;
-                       this.writeAccessors = writeAccessors;
+//                     this.writeAccessors = writeAccessors;
                        this.literalFormat = literalFormat;
                        
                        StringBuilder sb = new StringBuilder ();
@@ -186,49 +186,5 @@ namespace System.Xml.Serialization
                        return membersHash.GetHashCode ();
                }
        }
-       
-       internal class KeyHelper
-       {
-               public static void AddField (StringBuilder sb, int n, string val)
-               {
-                       AddField (sb, n, val, null);
-               }
-               
-               public static void AddField (StringBuilder sb, int n, string val, string def)
-               {
-                       if (val != def) {
-                               sb.Append (n.ToString());
-                               sb.Append (val.Length.ToString(CultureInfo.InvariantCulture));
-                               sb.Append (val);
-                       }
-               }
-               
-               public static void AddField (StringBuilder sb, int n, bool val)
-               {
-                       AddField (sb, n, val, false);
-               }
-               
-               public static void AddField (StringBuilder sb, int n, bool val, bool def)
-               {
-                       if (val != def)
-                               sb.Append (n.ToString());
-               }
-               
-               public static void AddField (StringBuilder sb, int n, int val, int def)
-               {
-                       if (val != def) {
-                               sb.Append (n.ToString());
-                               sb.Append (val.ToString(CultureInfo.InvariantCulture));
-                       }
-               }
-               
-               public static void AddField (StringBuilder sb, int n, Type val)
-               {
-                       if (val != null) {
-                               sb.Append (n.ToString(CultureInfo.InvariantCulture));
-                               sb.Append (val.ToString());
-                       }
-               }
-       }
 }