Merge pull request #1275 from ranma42/fix-lib64
[mono.git] / mcs / class / System.XML / System.Xml.Serialization / XmlAnyElementAttributes.cs
index b5b9b8a1c2d0a9a672264c9af3261cbdb097916a..5b1d349548564825319c0b82c8f72880acb5a1b6 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System.Xml;
-using System.Xml.Serialization;
 using System.Collections;
-using System;
+using System.Collections.Generic;
 
 namespace System.Xml.Serialization
 {
        /// <summary>
        /// Summary description for XmlAnyElementAttributes.
        /// </summary>
-       public class XmlAnyElementAttributes : CollectionBase
-       {
-               
+
+       public class XmlAnyElementAttributes : CollectionBase {
+
                public XmlAnyElementAttribute this[int index] 
                {
                        get 
@@ -55,7 +53,7 @@ namespace System.Xml.Serialization
 
                public int Add(XmlAnyElementAttribute attribute)
                {
-                       return List.Add(attribute);
+                       return (List as IList).Add (attribute);
                }
 
                public bool Contains(XmlAnyElementAttribute attribute)
@@ -92,5 +90,14 @@ namespace System.Xml.Serialization
                                this[n].AddKeyHash (sb);
                        sb.Append ('|');
                }
+
+               internal int Order {
+                       get {
+                               foreach (XmlAnyElementAttribute e in this)
+                                       if (e.Order >= 0)
+                                               return e.Order;
+                               return -1;
+                       }
+               }
        }
 }