소스 검색

2007-11-06 Marek Habersack <[email protected]>

	* BuildManager.cs: properly retrieve the BuildProviderCollection
	from configuration files.

svn path=/trunk/mcs/; revision=88979
Marek Habersack 18 년 전
부모
커밋
96c1dc6e78
2개의 변경된 파일11개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
  2. 5 0
      mcs/class/System.Web/System.Web.Compilation/ChangeLog

+ 6 - 2
mcs/class/System.Web/System.Web.Compilation/BuildManager.cs

@@ -84,14 +84,18 @@ namespace System.Web.Compilation {
 		internal static BuildProvider GetBuildProviderForPath (string virtualPath, bool throwOnMissing)
 		{
 			string extension = VirtualPathUtility.GetExtension (virtualPath);
-			object o = WebConfigurationManager.GetSection ("system.web/compilation/buildProviders", virtualPath);
-			BuildProviderCollection coll = o as BuildProviderCollection;
+			CompilationSection c = WebConfigurationManager.GetSection ("system.web/compilation", virtualPath) as CompilationSection;
+			if (c == null)
+				ThrowNoProviderException (extension);
+			
+			BuildProviderCollection coll = c.BuildProviders;
 			if (coll == null || coll.Count == 0)
 				ThrowNoProviderException (extension);
 			
 			BuildProvider provider = coll.GetProviderForExtension (extension);
 			if (provider == null && throwOnMissing)
 				ThrowNoProviderException (extension);
+
 			return provider;
 		}
 		

+ 5 - 0
mcs/class/System.Web/System.Web.Compilation/ChangeLog

@@ -1,3 +1,8 @@
+2007-11-06  Marek Habersack  <[email protected]>
+
+	* BuildManager.cs: properly retrieve the BuildProviderCollection
+	from configuration files.
+
 2007-11-03  Marek Habersack  <[email protected]>
 
 	* TemplateControlCompiler.cs: do not call converters specified in