targetNetwork -> targetFramework
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / FormsAuthenticationUserCollection.cs
index 07da09da033b138b4e6fbc099bd525f463a2af89..8eb653de0d5a726e6fab2e5caa880b384c4e4fc5 100644 (file)
@@ -95,20 +95,30 @@ namespace System.Web.Configuration
                        BaseRemoveAt (index);
                }
 
-               [MonoTODO]
                public void Set (FormsAuthenticationUser user)
                {
-                       throw new NotImplementedException ();
+                       FormsAuthenticationUser 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 ();
+                               string[] keys = new string[Count];
+                               for (int i = 0; i < Count; i ++)
+                                       keys[i] = this[i].Name;
+                               return keys;
                        }
                }
 
-               protected override ConfigurationElementCollectionType CollectionType {
+               public override ConfigurationElementCollectionType CollectionType {
                        get { return ConfigurationElementCollectionType.BasicMap; }
                }