2005-12-05 Chris Toshok <toshok@ximian.com>
authorChris Toshok <toshok@novell.com>
Mon, 5 Dec 2005 22:56:21 +0000 (22:56 -0000)
committerChris Toshok <toshok@novell.com>
Mon, 5 Dec 2005 22:56:21 +0000 (22:56 -0000)
* AuthorizationRuleCollection.cs (GetKey): split out the logic for
creating a key from a rule here.
(GetElementKey): use it here.
(Remove): and here.

svn path=/trunk/mcs/; revision=53957

mcs/class/System.Web/System.Web.Configuration_2.0/AuthorizationRuleCollection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog

index fed18fd774c73a1476b38a0869fd859a7f0f2c3d..45496e7114842eeae6ea1d61833e2af370a2a09f 100644 (file)
@@ -70,12 +70,17 @@ namespace System.Web.Configuration {
                        return (AuthorizationRule) BaseGet (index);
                }
 
+               string GetKey (AuthorizationRule rule)
+               {
+                       return String.Format ("{0}-{1}-{2}-{3}", rule.Action, rule.Roles, rule.Users, rule.Verbs);
+               }
+
                [MonoTODO ("this should work, right?")]
                protected override object GetElementKey (ConfigurationElement element)
                {
                        AuthorizationRule rule = (AuthorizationRule)element;
 
-                       return String.Format ("{0}-{1}-{2}-{3}", rule.Action, rule.Roles, rule.Users, rule.Verbs);
+                       return GetKey (rule);
                }
 
                public int IndexOf (AuthorizationRule rule)
@@ -90,7 +95,7 @@ namespace System.Web.Configuration {
 
                public void Remove (AuthorizationRule rule)
                {
-                       BaseRemove (rule);
+                       BaseRemove (GetKey (rule));
                }
 
                public void RemoveAt (int index)
index 0f0f695306d861e32f773979fdc3c883e9d9a3e9..3325366a6ce4657fac21669e7683794d6ccac2d5 100644 (file)
@@ -1,3 +1,10 @@
+2005-12-05  Chris Toshok  <toshok@ximian.com>
+
+       * AuthorizationRuleCollection.cs (GetKey): split out the logic for
+       creating a key from a rule here.
+       (GetElementKey): use it here.
+       (Remove): and here.
+
 2005-12-04  Chris Toshok  <toshok@ximian.com>
 
        * UrlMapping.cs: add an internal argument-less ctor.