Browse Source

2009-12-02 Marek Habersack <[email protected]>

	* CompilationSection.cs: added two properties -
	OptimizeCompilations (3.5+) and TargetNetwork (4.0+)

svn path=/trunk/mcs/; revision=147399
Marek Habersack 16 years ago
parent
commit
c91b60ae6e

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

@@ -1,3 +1,8 @@
+2009-12-02  Marek Habersack  <[email protected]>
+
+	* CompilationSection.cs: added two properties -
+	OptimizeCompilations (3.5+) and TargetNetwork (4.0+)
+
 2009-11-19  Marek Habersack  <[email protected]>
 
 	* WebConfigurationHost.cs: IsDefinitionAllowed now normalizes the

+ 32 - 0
mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs

@@ -55,6 +55,10 @@ namespace System.Web.Configuration
 		static ConfigurationProperty expressionBuildersProp;
 		static ConfigurationProperty urlLinePragmasProp;
 		static ConfigurationProperty codeSubDirectoriesProp;
+		static ConfigurationProperty optimizeCompilationsProp;
+#if NET_4_0
+		static ConfigurationProperty targetNetworkProp;
+#endif
 		
 		static CompilationSection ()
 		{
@@ -91,6 +95,16 @@ namespace System.Web.Configuration
 			tempDirectoryProp = new ConfigurationProperty ("tempDirectory", typeof (string), "");
 			urlLinePragmasProp = new ConfigurationProperty ("urlLinePragmas", typeof (bool), false);
 
+			// This is a 4.0 property but it is also supported in 3.5 with
+			// this hotfix: http://support.microsoft.com/kb/961884
+			optimizeCompilationsProp = new ConfigurationProperty ("optimizeCompilations", typeof (bool), false);
+
+#if NET_4_0
+			// Mono ignores this as there is no way to switch the runtime version
+			// dynamically while application is running
+			targetNetworkProp = new ConfigurationProperty ("targetNetwork", typeof (string), null);
+#endif
+
 			properties = new ConfigurationPropertyCollection ();
 			properties.Add (assembliesProp);
 			properties.Add (assemblyPostProcessorTypeProp);
@@ -111,6 +125,10 @@ namespace System.Web.Configuration
 			properties.Add (strictProp);
 			properties.Add (tempDirectoryProp);
 			properties.Add (urlLinePragmasProp);
+			properties.Add (optimizeCompilationsProp);
+#if NET_4_0
+			properties.Add (targetNetworkProp);
+#endif
 		}
 
 		public CompilationSection ()
@@ -211,12 +229,26 @@ namespace System.Web.Configuration
 			set { base [numRecompilesBeforeAppRestartProp] = value; }
 		}
 
+		[ConfigurationProperty ("optimizeCompilations", DefaultValue = "False")]
+		public bool OptimizeCompilations {
+			get { return (bool) base [optimizeCompilationsProp]; }
+			set { base [optimizeCompilationsProp] = value; }
+		}
+		
 		[ConfigurationProperty ("strict", DefaultValue = "False")]
 		public bool Strict {
 			get { return (bool) base [strictProp]; }
 			set { base [strictProp] = value; }
 		}
 
+#if NET_4_0
+		[ConfigurationProperty ("targetNetwork", DefaultValue = null)]
+		public string TargetNetwork {
+			get { return (string) base [targetNetworkProp]; }
+			set { base [targetNetworkProp] = value; }
+		}
+#endif
+		
 		[ConfigurationProperty ("tempDirectory", DefaultValue = "")]
 		public string TempDirectory {
 			get { return (string) base [tempDirectoryProp]; }