Просмотр исходного кода

2005-11-26 Chris Toshok <[email protected]>

	* AuthorizationRuleCollection.cs (GetElementKey): implement this.

	* ProfilePropertyNameValidator.cs: make this internal, and add a
	blurb about how MS doesn't do the testing you'd expect them to.


svn path=/trunk/mcs/; revision=53515
Chris Toshok 20 лет назад
Родитель
Сommit
8f8a3e2cc5

+ 4 - 2
mcs/class/System.Web/System.Web.Configuration_2.0/AuthorizationRuleCollection.cs

@@ -70,10 +70,12 @@ namespace System.Web.Configuration {
 			return (AuthorizationRule) BaseGet (index);
 		}
 
-		[MonoTODO]
+		[MonoTODO ("this should work, right?")]
 		protected override object GetElementKey (ConfigurationElement element)
 		{
-			throw new NotImplementedException ();
+			AuthorizationRule rule = (AuthorizationRule)element;
+
+			return String.Format ("{0}-{1}-{2}-{3}", rule.Action, rule.Roles, rule.Users, rule.Verbs);
 		}
 
 		public int IndexOf (AuthorizationRule rule)

+ 7 - 0
mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog

@@ -1,3 +1,10 @@
+2005-11-26  Chris Toshok  <[email protected]>
+
+	* AuthorizationRuleCollection.cs (GetElementKey): implement this.
+
+	* ProfilePropertyNameValidator.cs: make this internal, and add a
+	blurb about how MS doesn't do the testing you'd expect them to.
+
 2005-11-25  Chris Toshok  <[email protected]>
 
 	* AuthorizationRuleCollection.cs (CreateNewElement): remove

+ 4 - 2
mcs/class/System.Web/System.Web.Configuration_2.0/ProfilePropertyNameValidator.cs

@@ -32,7 +32,7 @@ using System.Configuration;
 
 namespace System.Web.Configuration
 {
-	public class ProfilePropertyNameValidator : StringValidator
+	internal class ProfilePropertyNameValidator : StringValidator
 	{
 		public ProfilePropertyNameValidator () : base (1)
 		{
@@ -43,7 +43,9 @@ namespace System.Web.Configuration
 		{
 			base.Validate (value);
 
-			/* XXX do additional checking too */
+			/* XXX this should really do additional
+			 * checking.  MS doesn't, but it makes almost
+			 * no sense */
 		}
 	}
 }