2009-08-24 Marek Habersack <mhabersack@novell.com>
[mono.git] / mcs / class / System.Web / System.Web / SiteMapNodeCollection.cs
index 2c5bd5e1478e33a4bb0f306ea56b37e122dec5e6..ed431ac4aef8e32cc99d6bcddb17afa069c9c95d 100644 (file)
@@ -42,7 +42,16 @@ namespace System.Web
        public class SiteMapNodeCollection : IList, IHierarchicalEnumerable
        {
                ArrayList list;
+#if TARGET_JVM
+               const string _siteMapNodeCollection_EmptyList = "SiteMapNodeCollection.EmptyList";
+               internal static SiteMapNodeCollection EmptyList
+               {
+                       get { return (SiteMapNodeCollection) AppDomain.CurrentDomain.GetData (_siteMapNodeCollection_EmptyList); }
+                       set { AppDomain.CurrentDomain.SetData (_siteMapNodeCollection_EmptyList, value); }
+               }
+#else
                internal static SiteMapNodeCollection EmptyList;
+#endif
                
                static SiteMapNodeCollection ()
                {
@@ -137,17 +146,17 @@ namespace System.Web
                        List.AddRange (value);
                }
 
-               public bool Contains (SiteMapNode value)
+               public virtual bool Contains (SiteMapNode value)
                {
                        return this.List.Contains (value);
                }
                
-               public void CopyTo (System.Web.SiteMapNode[] array, int index)
+               public virtual void CopyTo (System.Web.SiteMapNode[] array, int index)
                {
                        this.List.CopyTo (array, index);
                }
                
-               public int IndexOf (SiteMapNode value)
+               public virtual int IndexOf (SiteMapNode value)
                {
                        return this.List.IndexOf (value);
                }
@@ -205,7 +214,9 @@ namespace System.Web
                public virtual bool IsReadOnly {
                        get { return list != null && list.IsReadOnly; }
                }
-               
+
+               #region IList Members
+
                object IList.this [int index] {
                        get { return List [index]; }
                        set { OnValidate (value); List [index] = value; }
@@ -243,6 +254,57 @@ namespace System.Web
                {
                        List.CopyTo (array, index);
                }
+
+               void IList.Clear () {
+                       Clear ();
+               }
+
+               bool IList.IsFixedSize {
+                       get { return IsFixedSize; }
+               }
+
+               bool IList.IsReadOnly {
+                       get { return IsReadOnly; }
+               }
+
+               void IList.RemoveAt (int index) {
+                       RemoveAt (index);
+               }
+
+               #endregion
+
+               #region ICollection Members
+
+
+               int ICollection.Count {
+                       get { return Count; }
+               }
+
+               bool ICollection.IsSynchronized {
+                       get { return IsSynchronized; }
+               }
+
+               object ICollection.SyncRoot {
+                       get { return SyncRoot; }
+               }
+
+               #endregion
+
+               #region IEnumerable Members
+
+               IEnumerator IEnumerable.GetEnumerator () {
+                       return GetEnumerator ();
+               }
+
+               #endregion
+
+               #region IHierarchicalEnumerable Members
+
+               IHierarchyData IHierarchicalEnumerable.GetHierarchyData (object enumeratedItem) {
+                       return GetHierarchyData (enumeratedItem);
+               }
+
+               #endregion
        }
 }
 #endif