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

2008-02-05 Marek Habersack <[email protected]>

	* CompilerCollection.cs: Get (string language) should not use
	BaseGet as our collection is keyed on a list of language names
	(e.g. "cs;csharp") and passing a single language won't match in
	BaseGet correctly. Use the overriden indexer instead.
	Initialize the base class with the case-insensitive comparer. 
        Fixes bug #357824.

svn path=/trunk/mcs/; revision=94898
Marek Habersack 18 лет назад
Родитель
Сommit
f773cf8a9c

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

@@ -1,3 +1,11 @@
+2008-02-05  Marek Habersack  <[email protected]>
+
+	* CompilerCollection.cs: Get (string language) should not use
+	BaseGet as our collection is keyed on a list of language names
+	(e.g. "cs;csharp") and passing a single language won't match in
+	BaseGet correctly. Use the overriden indexer instead.
+	Initialize the base class with the case-insensitive comparer.
+
 2008-01-27  Daniel Nauck <[email protected]>
 
 	* HttpHandlerAction.cs: fixed the internal method PathMatches ()

+ 3 - 1
mcs/class/System.Web/System.Web.Configuration_2.0/CompilerCollection.cs

@@ -31,6 +31,7 @@
 #if NET_2_0
 
 using System;
+using System.Collections;
 using System.Configuration;
 
 namespace System.Web.Configuration
@@ -46,6 +47,7 @@ namespace System.Web.Configuration
 		}
 
 		public CompilerCollection ()
+			: base (CaseInsensitiveComparer.DefaultInvariant)
 		{
 		}
 
@@ -61,7 +63,7 @@ namespace System.Web.Configuration
 
 		public Compiler Get (string language)
 		{
-			return (Compiler) BaseGet (language);
+			return this [language];
 		}
 
 		protected override object GetElementKey (ConfigurationElement element)