Ver Fonte

2006-02-01 Chris Toshok <[email protected]>

	* TemplateParser.cs: CONFIGURATION_2_0 => NET_2_0, and replace
	calls to GetWebApplicationSection with GetSection.

	* SimpleWebHandlerParser.cs: same.

	* Page.cs: same.

	* PageParser.cs: same.

	* BaseParser.cs: same.


svn path=/trunk/mcs/; revision=56415
Chris Toshok há 20 anos atrás
pai
commit
6550ae7c10

+ 2 - 2
mcs/class/System.Web/System.Web.UI/BaseParser.cs

@@ -46,7 +46,7 @@ namespace System.Web.UI
 		string baseDir;
 		string baseVDir;
 		ILocation location;
-#if !CONFIGURATION_2_0
+#if !NET_2_0
 		CompilationConfiguration compilationConfig;
 #endif
 
@@ -138,7 +138,7 @@ namespace System.Web.UI
 			set { baseVDir = value; }
 		}
 
-#if CONFIGURATION_2_0
+#if NET_2_0
 		internal CompilationSection CompilationConfig {
 			get {
 				return WebConfigurationManager.GetSection ("system.web/compilation") as CompilationSection;

+ 13 - 0
mcs/class/System.Web/System.Web.UI/ChangeLog

@@ -1,3 +1,16 @@
+2006-02-01  Chris Toshok  <[email protected]>
+
+	* TemplateParser.cs: CONFIGURATION_2_0 => NET_2_0, and replace
+	calls to GetWebApplicationSection with GetSection.
+
+	* SimpleWebHandlerParser.cs: same.
+
+	* Page.cs: same.
+
+	* PageParser.cs: same.
+
+	* BaseParser.cs: same.
+
 2006-01-27  Chris Toshok  <[email protected]>
 
 	* MasterPage.cs (ContentTemplatesInternal): add get/set for the

+ 4 - 4
mcs/class/System.Web/System.Web.UI/Page.cs

@@ -786,15 +786,15 @@ public class Page : TemplateControl, IHttpHandler
 
 	LosFormatter GetFormatter ()
 	{
-#if CONFIGURATION_2_0
-		PagesSection config = (PagesSection) WebConfigurationManager.GetWebApplicationSection ("system.web/pages");
+#if NET_2_0
+		PagesSection config = (PagesSection) WebConfigurationManager.GetSection ("system.web/pages");
 #else
 		PagesConfiguration config = PagesConfiguration.GetInstance (_context);
 #endif
 		byte [] vkey = null;
 		if (config.EnableViewStateMac) {
-#if CONFIGURATION_2_0
-			MachineKeySection mconfig = (MachineKeySection) WebConfigurationManager.GetWebApplicationSection ("system.web/machineKey");
+#if NET_2_0
+			MachineKeySection mconfig = (MachineKeySection) WebConfigurationManager.GetSection ("system.web/machineKey");
 			vkey = mconfig.ValidationKeyBytes;
 #else
 			MachineKeyConfig mconfig = HttpContext.GetAppConfig ("system.web/machineKey") as MachineKeyConfig;

+ 2 - 2
mcs/class/System.Web/System.Web.UI/PageParser.cs

@@ -89,7 +89,7 @@ namespace System.Web.UI
 		internal override void ProcessMainAttributes (Hashtable atts)
 		{
 			string enabless = GetString (atts, "EnableSessionState",
-#if CONFIGURATION_2_0
+#if NET_2_0
 						     PagesConfig.EnableSessionState.ToString()
 #else
 						     PagesConfig.EnableSessionState
@@ -236,7 +236,7 @@ namespace System.Web.UI
 			validateRequest = GetBool (atts, "ValidateRequest", PagesConfig.ValidateRequest);
 			clientTarget = GetString (atts, "ClientTarget", null);
 			if (clientTarget != null) {
-#if CONFIGURATION_2_0
+#if NET_2_0
 				ClientTargetSection sec = (ClientTargetSection)WebConfigurationManager.GetSection ("system.web/clientTarget");
 				if (sec.ClientTargets[clientTarget] == null) {
 					ThrowParseException (String.Format (

+ 4 - 7
mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs

@@ -58,7 +58,7 @@ namespace System.Web.UI
 		string privateBinPath;
 		string baseDir;
 		string baseVDir;
-#if !CONFIGURATION_2_0
+#if !NET_2_0
 		CompilationConfiguration compilationConfig;
 #endif
 		int appAssemblyIndex = -1;
@@ -80,7 +80,7 @@ namespace System.Web.UI
 			if (location != typeof (TemplateParser).Assembly.Location)
 				appAssemblyIndex = assemblies.Add (location);
 
-#if CONFIGURATION_2_0
+#if NET_2_0
 			bool addAssembliesInBin = false;
 			foreach (AssemblyInfo info in CompilationConfig.Assemblies) {
 				if (info.Assembly == "*")
@@ -96,9 +96,6 @@ namespace System.Web.UI
 				AddAssembliesInBin ();
 #endif
 
-#if !CONFIGURATION_2_0
-#endif
-
 			language = CompilationConfig.DefaultLanguage;
 
 			GetDirectivesAndContent ();
@@ -465,10 +462,10 @@ namespace System.Web.UI
 			}
 		}
 
-#if CONFIGURATION_2_0
+#if NET_2_0
 		CompilationSection CompilationConfig {
 			get {
-				return (CompilationSection)WebConfigurationManager.GetWebApplicationSection ("system.web/compilation");
+				return (CompilationSection)WebConfigurationManager.GetSection ("system.web/compilation");
 			}
 		}
 #else

+ 2 - 2
mcs/class/System.Web/System.Web.UI/TemplateParser.cs

@@ -92,7 +92,7 @@ namespace System.Web.UI {
 			imports.Add ("System.Web.UI.HtmlControls");
 
 			assemblies = new ArrayList ();
-#if CONFIGURATION_2_0
+#if NET_2_0
 			bool addAssembliesInBin = false;
 			foreach (AssemblyInfo info in CompilationConfig.Assemblies) {
 				if (info.Assembly == "*")
@@ -690,7 +690,7 @@ namespace System.Web.UI {
 			get { return oc_param; }
 		}
 
-#if CONFIGURATION_2_0
+#if NET_2_0
 		internal PagesSection PagesConfig {
 			get {
 				return WebConfigurationManager.GetSection ("system.web/pages") as PagesSection;