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)
public void Remove (AuthorizationRule rule)
{
- BaseRemove (rule);
+ BaseRemove (GetKey (rule));
}
public void RemoveAt (int index)
+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.