targetNetwork -> targetFramework
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / OutputCacheProfileCollection.cs
index 49c8132038c33314346f2c684b7a0e8effab8fa1..3925f40b29423dfea171d80f1758853de6b37dc1 100644 (file)
@@ -58,7 +58,7 @@ namespace System.Web.Configuration {
 
                protected override ConfigurationElement CreateNewElement ()
                {
-                       return new OutputCacheProfile ("");
+                       return new OutputCacheProfile ();
                }
 
                protected override object GetElementKey (ConfigurationElement element)
@@ -91,15 +91,27 @@ namespace System.Web.Configuration {
                        BaseRemoveAt (index);
                }
 
-               [MonoTODO]
                public void Set (OutputCacheProfile user)
                {
-                       throw new NotImplementedException ();
+                       OutputCacheProfile existing = Get (user.Name);
+
+                       if (existing == null) {
+                               Add (user);
+                       }
+                       else {
+                               int index = BaseIndexOf (existing);
+                               RemoveAt (index);
+                               BaseAdd (index, user);
+                       }
                }
 
-               [MonoTODO]
-               public String[] AllKeys {
-                       get { throw new NotImplementedException (); }
+               public string[] AllKeys {
+                       get {
+                               string[] keys = new string[Count];
+                               for (int i = 0; i < Count; i ++)
+                                       keys[i] = this[i].Name;
+                               return keys;
+                       }
                }
 
                public OutputCacheProfile this [int index] {