Przeglądaj źródła

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

	* HttpApplication.cs: CONFIGURATION_2_0 => NET_2_0, and use
	GetSection instead of GetWebApplicationSection.

	* HttpApplication.jvm.cs: same.
	
	* HttpApplicationFactory.cs: same.

	* HttpContext.cs: same.

	* CapabilitiesLoader.cs: same.

	* QueueManager.cs: same.

	* HttpRuntime.cs: same.

	* TraceManager.cs: same.

	* HttpRequest.cs: same.


svn path=/trunk/mcs/; revision=56409
Chris Toshok 20 lat temu
rodzic
commit
7a6c32f55a

+ 1 - 1
mcs/class/System.Web/System.Web/CapabilitiesLoader.cs

@@ -184,7 +184,7 @@ namespace System.Web
 #if TARGET_J2EE
 				string filepath = "browscap.ini";
 #else
-#if CONFIGURATION_2_0
+#if NET_2_0
 				string dir = Path.GetDirectoryName (WebConfigurationManager.OpenMachineConfiguration().FilePath);
 #else
 				string dir = Path.GetDirectoryName (WebConfigurationSettings.MachineConfigPath);

+ 21 - 0
mcs/class/System.Web/System.Web/ChangeLog

@@ -1,3 +1,24 @@
+2006-02-01  Chris Toshok  <[email protected]>
+
+	* HttpApplication.cs: CONFIGURATION_2_0 => NET_2_0, and use
+	GetSection instead of GetWebApplicationSection.
+
+	* HttpApplication.jvm.cs: same.
+	
+	* HttpApplicationFactory.cs: same.
+
+	* HttpContext.cs: same.
+
+	* CapabilitiesLoader.cs: same.
+
+	* QueueManager.cs: same.
+
+	* HttpRuntime.cs: same.
+
+	* TraceManager.cs: same.
+
+	* HttpRequest.cs: same.
+	
 2006-01-31 Gonzalo Paniagua Javier <[email protected]>
 
 	* HttpApplication.cs: keep any exception that happens during

+ 9 - 9
mcs/class/System.Web/System.Web/HttpApplication.cs

@@ -147,9 +147,9 @@ namespace System.Web {
 				if (modcoll != null)
 					return;
 
-#if CONFIGURATION_2_0
+#if NET_2_0
 				HttpModulesSection modules;
-				modules = (HttpModulesSection) WebConfigurationManager.GetWebApplicationSection ("system.web/httpModules");
+				modules = (HttpModulesSection) WebConfigurationManager.GetSection ("system.web/httpModules");
 #else
 				ModulesConfiguration modules;
 
@@ -161,9 +161,9 @@ namespace System.Web {
 				if (full_init)
 					HttpApplicationFactory.AttachEvents (this);
 
-#if CONFIGURATION_2_0
+#if NET_2_0
 				GlobalizationSection cfg;
-				cfg = (GlobalizationSection) WebConfigurationManager.GetWebApplicationSection ("system.web/globalization");
+				cfg = (GlobalizationSection) WebConfigurationManager.GetSection ("system.web/globalization");
 				app_culture = cfg.GetCulture();
 				appui_culture = cfg.GetUICulture();
 #else
@@ -1049,8 +1049,8 @@ namespace System.Web {
 			string url = request.FilePath;
 			
 			IHttpHandler handler = null;
-#if CONFIGURATION_2_0
-			HttpHandlersSection section = (HttpHandlersSection) WebConfigurationManager.GetWebApplicationSection ("system.web/httpHandlers");
+#if NET_2_0
+			HttpHandlersSection section = (HttpHandlersSection) WebConfigurationManager.GetSection ("system.web/httpHandlers");
 			object o = section.LocateHandler (verb, url);
 #else
 			HandlerFactoryConfiguration factory_config = (HandlerFactoryConfiguration) HttpContext.GetAppConfig ("system.web/httpHandlers");
@@ -1146,8 +1146,8 @@ namespace System.Web {
 			if (!context.IsCustomErrorEnabled)
 				return false;
 			
-#if CONFIGURATION_2_0
-			CustomErrorsSection config = (CustomErrorsSection)WebConfigurationManager.GetWebApplicationSection ("system.web/customErrors");
+#if NET_2_0
+			CustomErrorsSection config = (CustomErrorsSection)WebConfigurationManager.GetSection ("system.web/customErrors");
 #else
 			CustomErrorsConfig config = null;
 			try {
@@ -1162,7 +1162,7 @@ namespace System.Web {
 				return false;
 			}
 			
-#if CONFIGURATION_2_0
+#if NET_2_0
 			CustomError err = config.Errors [context.Response.StatusCode.ToString()];
 			string redirect = err == null ? null : err.Redirect;
 #else

+ 9 - 9
mcs/class/System.Web/System.Web/HttpApplication.jvm.cs

@@ -143,9 +143,9 @@ namespace System.Web {
 				if (modcoll != null)
 					return;
 
-#if CONFIGURATION_2_0
+#if NET_2_0
 				HttpModulesSection modules;
-				modules = (HttpModulesSection) WebConfigurationManager.GetWebApplicationSection ("system.web/httpModules");
+				modules = (HttpModulesSection) WebConfigurationManager.GetSection ("system.web/httpModules");
 #else
 				ModulesConfiguration modules;
 
@@ -157,9 +157,9 @@ namespace System.Web {
 				if (full_init)
 					HttpApplicationFactory.AttachEvents (this);
 
-#if CONFIGURATION_2_0
+#if NET_2_0
 				GlobalizationSection cfg;
-				cfg = (GlobalizationSection) WebConfigurationManager.GetWebApplicationSection ("system.web/globalization");
+				cfg = (GlobalizationSection) WebConfigurationManager.GetSection ("system.web/globalization");
 				app_culture = cfg.GetCulture();
 				appui_culture = cfg.GetUICulture();
 #else
@@ -1495,8 +1495,8 @@ yield_19:
 			string url = request.FilePath;
 			
 			IHttpHandler handler = null;
-#if CONFIGURATION_2_0
-			HttpHandlersSection section = (HttpHandlersSection) WebConfigurationManager.GetWebApplicationSection ("system.web/httpHandlers");
+#if NET_2_0
+			HttpHandlersSection section = (HttpHandlersSection) WebConfigurationManager.GetSection ("system.web/httpHandlers");
 			object o = section.LocateHandler (verb, url);
 #else
 			HandlerFactoryConfiguration factory_config = (HandlerFactoryConfiguration) HttpContext.GetAppConfig ("system.web/httpHandlers");
@@ -1595,8 +1595,8 @@ yield_19:
 			if (!context.IsCustomErrorEnabled)
 				return false;
 			
-#if CONFIGURATION_2_0
-			CustomErrorsSection config = (CustomErrorsSection)WebConfigurationManager.GetWebApplicationSection ("system.web/customErrors");
+#if NET_2_0
+			CustomErrorsSection config = (CustomErrorsSection)WebConfigurationManager.GetSection ("system.web/customErrors");
 #else
 			CustomErrorsConfig config = null;
 			try {
@@ -1611,7 +1611,7 @@ yield_19:
 				return false;
 			}
 			
-#if CONFIGURATION_2_0
+#if NET_2_0
 			CustomError err = config.Errors [context.Response.StatusCode.ToString()];
 			string redirect = err == null ? null : err.Redirect;
 #else

+ 1 - 1
mcs/class/System.Web/System.Web/HttpApplicationFactory.cs

@@ -364,7 +364,7 @@ namespace System.Web {
 				if (!File.Exists (app_file))
 					app_file = Path.Combine (physical_app_path, "global.asax");
 			
-#if CONFIGURATION_2_0
+#if NET_2_0
 				WebConfigurationManager.Init ();
 #else
 				WebConfigurationSettings.Init (context);

+ 8 - 10
mcs/class/System.Web/System.Web/HttpContext.cs

@@ -43,8 +43,6 @@ using System.Web.UI;
 using System.Web.Util;
 #if NET_2_0
 using System.Web.Profile;
-#endif
-#if CONFIGURATION_2_0
 using CustomErrorMode = System.Web.Configuration.CustomErrorsMode;
 #endif
 
@@ -167,8 +165,8 @@ namespace System.Web {
 
 		public bool IsCustomErrorEnabled {
 			get {
-#if CONFIGURATION_2_0
-				CustomErrorsSection cfg = (CustomErrorsSection) WebConfigurationManager.GetWebApplicationSection ("system.web/customErrors");
+#if NET_2_0
+				CustomErrorsSection cfg = (CustomErrorsSection) WebConfigurationManager.GetSection ("system.web/customErrors");
 #else
 				CustomErrorsConfig cfg = null;
 				try {
@@ -192,8 +190,8 @@ namespace System.Web {
 #else
 		public bool IsDebuggingEnabled {
 			get {
-#if CONFIGURATION_2_0
-				CompilationSection section = (CompilationSection) WebConfigurationManager.GetWebApplicationSection ("system.web/compilation");
+#if NET_2_0
+				CompilationSection section = (CompilationSection) WebConfigurationManager.GetSection ("system.web/compilation");
 				return section.Debug;
 #else
 				try {
@@ -334,7 +332,7 @@ namespace System.Web {
 #endif
 		public object GetConfig (string name)
 		{
-#if CONFIGURATION_2_0
+#if NET_2_0
 			return GetSection (name);
 #else
 			return WebConfigurationSettings.GetConfig (name, this);
@@ -369,7 +367,7 @@ namespace System.Web {
 		[MonoTODO]
 		public object GetSection (string name)
 		{
-#if CONFIGURATION_2_0
+#if NET_2_0
 			return WebConfigurationManager.GetSection (name);
 #else
 			throw new NotImplementedException ();
@@ -475,8 +473,8 @@ namespace System.Web {
 		internal TimeSpan ConfigTimeout {
 			get {
 				if (config_timeout == null) {
-#if CONFIGURATION_2_0
-					HttpRuntimeSection section = (HttpRuntimeSection)WebConfigurationManager.GetWebApplicationSection ("system.web/httpRuntime");
+#if NET_2_0
+					HttpRuntimeSection section = (HttpRuntimeSection)WebConfigurationManager.GetSection ("system.web/httpRuntime");
 					config_timeout = section.ExecutionTimeout;
 #else
 					HttpRuntimeConfig config = (HttpRuntimeConfig)

+ 4 - 4
mcs/class/System.Web/System.Web/HttpRequest.cs

@@ -554,8 +554,8 @@ namespace System.Web {
 			if (content_length == 0 && HttpMethod == "POST")
 				throw new HttpException (411, "Length expected");
 			
-#if CONFIGURATION_2_0
-			HttpRuntimeSection config = (HttpRuntimeSection) WebConfigurationManager.GetWebApplicationSection ("system.web/httpRuntime");
+#if NET_2_0
+			HttpRuntimeSection config = (HttpRuntimeSection) WebConfigurationManager.GetSection ("system.web/httpRuntime");
 #else
 			HttpRuntimeConfig config = (HttpRuntimeConfig) HttpContext.GetAppConfig ("system.web/httpRuntime");
 #endif
@@ -632,8 +632,8 @@ namespace System.Web {
 			//
 			int content_length = ContentLength;
 
-#if CONFIGURATION_2_0
-			HttpRuntimeSection config = (HttpRuntimeSection) WebConfigurationManager.GetWebApplicationSection ("system.web/httpRuntime");
+#if NET_2_0
+			HttpRuntimeSection config = (HttpRuntimeSection) WebConfigurationManager.GetSection ("system.web/httpRuntime");
 #else
 			HttpRuntimeConfig config = (HttpRuntimeConfig) HttpContext.GetAppConfig ("system.web/httpRuntime");
 #endif

+ 1 - 1
mcs/class/System.Web/System.Web/HttpRuntime.cs

@@ -205,7 +205,7 @@ namespace System.Web {
 
 		public static string MachineConfigurationDirectory {
 			get {
-#if CONFIGURATION_2_0
+#if NET_2_0
 				string dirname = Path.GetDirectoryName (WebConfigurationManager.OpenMachineConfiguration().FilePath);
 #else
 				string dirname = Path.GetDirectoryName (WebConfigurationSettings.MachineConfigPath);

+ 1 - 1
mcs/class/System.Web/System.Web/QueueManager.cs

@@ -45,7 +45,7 @@ namespace System.Web
 
 		public QueueManager ()
 		{
-#if CONFIGURATION_2_0
+#if NET_2_0
 			HttpRuntimeSection config;
 
 			config = (HttpRuntimeSection) WebConfigurationManager.GetSection ("system.web/httpRuntime");

+ 2 - 2
mcs/class/System.Web/System.Web/TraceManager.cs

@@ -49,7 +49,7 @@ namespace System.Web {
 		
 		public TraceManager ()
 		{
-#if CONFIGURATION_2_0
+#if NET_2_0
 			TraceSection config = WebConfigurationManager.GetSection ("system.web/trace") as TraceSection;
 			if (config == null)
 				config = new TraceSection ();
@@ -63,7 +63,7 @@ namespace System.Web {
 			enabled = config.Enabled;
 			local_only = config.LocalOnly;
 			page_output = config.PageOutput;
-#if CONFIGURATION_2_0
+#if NET_2_0
 			if (config.TraceMode == TraceDisplayMode.SortByTime)
 				mode = TraceMode.SortByTime;
 			else