Warnings cleanup
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / HttpHandlerActionCollection.cs
index 30ece79fe0dfbd6c3e44f90fde53cac73cabaee9..6c874f0f4b2734669b8ee00cfee0faabe6a6e73e 100644 (file)
@@ -38,69 +38,77 @@ namespace System.Web.Configuration
        [ConfigurationCollection (typeof (HttpHandlerAction), CollectionType = ConfigurationElementCollectionType.AddRemoveClearMapAlternate)]
        public sealed class HttpHandlerActionCollection : ConfigurationElementCollection
        {
+               static ConfigurationPropertyCollection properties;
+
+               static HttpHandlerActionCollection ()
+               {
+                       properties = new ConfigurationPropertyCollection ();
+               }
+
                public HttpHandlerActionCollection ()
                {
                }
                        
                public void Add (HttpHandlerAction httpHandlerAction)
                {
+                       HttpApplication.ClearHandlerCache ();
+                       BaseAdd (httpHandlerAction);
                }
 
                public void Clear ()
                {
+                       HttpApplication.ClearHandlerCache ();
+                       BaseClear ();
                }
 
                protected override ConfigurationElement CreateNewElement ()
                {
-                       throw new NotImplementedException ();
+                       return new HttpHandlerAction ();
                }
 
                protected override object GetElementKey (ConfigurationElement element)
                {
-                       throw new NotImplementedException ();
+                       return ((HttpHandlerAction)element).Path + "-" + ((HttpHandlerAction)element).Verb;
                }
 
                public int IndexOf (HttpHandlerAction action)
                {
-                       throw new NotImplementedException ();
+                       return BaseIndexOf (action);
                }
 
                public void Remove (string verb, string path)
                {
+                       HttpApplication.ClearHandlerCache ();
+                       BaseRemove (path + "-" + verb);
                }
 
                public void Remove (HttpHandlerAction action)
                {
+                       HttpApplication.ClearHandlerCache ();
+                       BaseRemove (action.Path + "-" + action.Verb);
                }
 
                public void RemoveAt (int index)
                {
+                       HttpApplication.ClearHandlerCache ();
+                       BaseRemoveAt (index);
                }
 
-               protected override ConfigurationElementCollectionType CollectionType {
-                       get {
-                       throw new NotImplementedException ();
-                       }
+               public override ConfigurationElementCollectionType CollectionType {
+                       get { return ConfigurationElementCollectionType.AddRemoveClearMapAlternate; }
                }
 
                protected override ConfigurationPropertyCollection Properties {
-                       get {
-                       throw new NotImplementedException ();
-                       }
+                       get { return properties; }
                }
 
                public HttpHandlerAction this[int index] {
-                       get {
-                       throw new NotImplementedException ();
-                       }
-                       set {
-                       }
+                       get { return (HttpHandlerAction)BaseGet (index); }
+                       set { if (BaseGet (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
                }
 
                protected override bool ThrowOnDuplicate {
-                       get {
-                       throw new NotImplementedException ();
-                       }
+                       get { return false; }
                }
        }
 }