Bläddra i källkod

2009-06-16 Marek Habersack <[email protected]>

	* RouteValueDictionaryExtensions.cs: do not compile if
	SYSTEMCORE_DEP is not defined

	* PatternParser.cs: if SYSTEMCORE_DEP is not defined, do not
	compile parts which require RouteValueDictionaryExtensions.

2009-06-16  Marek Habersack  <[email protected]>

	* Makefile (LIB_MCS_FLAGS): define SYSTEMCORE_DEP

2009-06-16  Marek Habersack  <[email protected]>

	* DynamicDataManager.cs, DynamicDataExtensions.cs: use new
	DataBoundControl.DataSourceObject instead of
	InternalGetDataSource

2009-06-16  Marek Habersack  <[email protected]>

	* Makefile: warn if the 4.0 assembly is compiled without
	System.Core

svn path=/trunk/mcs/; revision=136222
Marek Habersack 16 år sedan
förälder
incheckning
9743d97ec8

+ 6 - 0
mcs/class/System.Web.DynamicData/System.Web.DynamicData/ChangeLog

@@ -1,3 +1,9 @@
+2009-06-16  Marek Habersack  <[email protected]>
+
+	* DynamicDataManager.cs, DynamicDataExtensions.cs: use new
+	DataBoundControl.DataSourceObject instead of
+	InternalGetDataSource.
+
 2009-06-12  Marek Habersack  <[email protected]>
 
 	* MetaTable.cs: implemented correct detection of foreign key

+ 1 - 1
mcs/class/System.Web.DynamicData/System.Web.DynamicData/DynamicDataExtensions.cs

@@ -83,7 +83,7 @@ namespace System.Web.DynamicData
 			while (current != null) {
 				DataBoundControl dbc = current as DataBoundControl;
 				if (dbc != null) {
-					IDynamicDataSource dds = dbc.InternalGetDataSource () as IDynamicDataSource;
+					IDynamicDataSource dds = dbc.DataSourceObject as IDynamicDataSource;
 					if (dds != null)
 						return dds.GetTable ();
 				}

+ 1 - 1
mcs/class/System.Web.DynamicData/System.Web.DynamicData/DynamicDataManager.cs

@@ -118,7 +118,7 @@ namespace System.Web.DynamicData
 
 			DataBoundControl dbc = control as DataBoundControl;
 			if (dbc != null) {
-				IDynamicDataSource dds = dbc.InternalGetDataSource () as IDynamicDataSource;
+				IDynamicDataSource dds = dbc.DataSourceObject as IDynamicDataSource;
 				if (dds == null)
 					return;
 

+ 2 - 0
mcs/class/System.Web.Routing/ChangeLog

@@ -1,5 +1,7 @@
 2009-06-16  Marek Habersack  <[email protected]>
 
+	* Makefile (LIB_MCS_FLAGS): define SYSTEMCORE_DEP
+
 	* net_4_0_System.Web.Routing.dll.sources: added. In the 4.0
 	profile all classes are compiled into System.Web,
 	System.Web.Routing becomes an empty assembly.

+ 1 - 1
mcs/class/System.Web.Routing/Makefile

@@ -11,7 +11,7 @@ LIB_MCS_FLAGS = \
 
 ifeq (2.0, $(FRAMEWORK_VERSION))
 # This is a .NET 3.5 only assembly, but built during the 2.0 build
-LIB_MCS_FLAGS += -d:NET_3_5
+LIB_MCS_FLAGS += -d:NET_3_5 -d:SYSTEMCORE_DEP
 endif
 
 ifdef DEBUG

+ 6 - 0
mcs/class/System.Web.Routing/System.Web.Routing/ChangeLog

@@ -1,5 +1,11 @@
 2009-06-16  Marek Habersack  <[email protected]>
 
+	* RouteValueDictionaryExtensions.cs: do not compile if
+	SYSTEMCORE_DEP is not defined
+
+	* PatternParser.cs: if SYSTEMCORE_DEP is not defined, do not
+	compile parts which require RouteValueDictionaryExtensions.
+
 	* Decorated all classes with the TypeForwardedFrom attribute for
 	the 4.0 profile.
 

+ 4 - 0
mcs/class/System.Web.Routing/System.Web.Routing/PatternParser.cs

@@ -453,6 +453,7 @@ namespace System.Web.Routing
 				string parameterName = token.Name;
 				object tokenValue;
 
+#if SYSTEMCORE_DEP
 				if (userValues.GetValue (parameterName, out tokenValue)) {
 					if (!defaultValues.Has (parameterName, tokenValue)) {
 						canTrim = false;
@@ -482,6 +483,7 @@ namespace System.Web.Routing
 						ret.Insert (0, tokenValue.ToString ());
 					continue;
 				}
+#endif
 			}
 
 			// All the values specified in userValues that aren't part of the original
@@ -492,8 +494,10 @@ namespace System.Web.Routing
 				foreach (var de in userValues) {
 					string parameterName = de.Key;
 
+#if SYSTEMCORE_DEP
 					if (parameterNames.ContainsKey (parameterName) || defaultValues.Has (parameterName) || constraints.Has (parameterName))
 						continue;
+#endif
 
 					if (first) {
 						ret.Append ('?');

+ 2 - 0
mcs/class/System.Web.Routing/System.Web.Routing/RouteValueDictionaryExtensions.cs

@@ -27,6 +27,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
+#if SYSTEMCORE_DEP
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
@@ -97,3 +98,4 @@ namespace System.Web.Routing
 		}
 	}
 }
+#endif

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

@@ -1,5 +1,8 @@
 2009-06-16  Marek Habersack  <[email protected]>
 
+	* Makefile: warn if the 4.0 assembly is compiled without
+	System.Core
+
 	* net_4_0_System.Web.dll.sources: added. System.Web.Routing and
 	System.Web.Abstractions are part of System.Web.dll in the 4.0
 	profile.

+ 9 - 2
mcs/class/System.Web/Makefile

@@ -198,8 +198,8 @@ LIB_MCS_FLAGS = \
 ifneq ($(CYCLIC_DEPS:%=../lib/$(PROFILE)/%), $(CYCLIC_DEP_FILES))
 NO_SIGN_ASSEMBLY = yes
 NO_INSTALL = yes
-all-local: System.Web/UplevelHelper.cs resources/TranslationResources.resources echo-warning
-.PHONY: echo-warning
+all-local: System.Web/UplevelHelper.cs resources/TranslationResources.resources echo-warning echo-warning-systemcore
+.PHONY: echo-warning echo-warning-systemcore
 
 ifeq   (, $(strip $(CYCLIC_DEP_FILES)))
 echo-warning:
@@ -207,6 +207,13 @@ echo-warning:
 endif
 endif
 
+ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
+ifndef SYSTEMCORE_DEP_FILE
+echo-warning-systemcore:
+	@echo "** Warning: System.Web.dll built without parts that depend on $(SYSTEMCORE_DEP)"
+endif
+endif
+
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -doc:$(test_lib:.dll=.xml)  -nowarn:219,169,1591 $(NUNIT_RESOURCE_FILES:%=/resource:%)
 ifeq (net_2_0, $(PROFILE))
 TEST_MCS_FLAGS += -r:System.Web.Extensions.dll

+ 2 - 2
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog

@@ -10,8 +10,8 @@
 	interface.
 
 	* DataBoundControl.cs: implemented 4.0 property DataSourceObject
-	and made the InternalPerformDataBinding method internal for the
-	4.0 profile.
+	(internal for 2.0) and made the InternalPerformDataBinding method
+	internal for the 4.0 profile.
 
 2009-06-11 Gonzalo Paniagua Javier <[email protected]>
 

+ 5 - 2
mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs

@@ -204,10 +204,13 @@ namespace System.Web.UI.WebControls {
 #if NET_4_0
 		[Browsable (false)]
 		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
-		public IDataSource DataSourceObject {
+		public
+#else
+		internal
+#endif
+		IDataSource DataSourceObject {
 			get { return GetDataSource (); }
 		}
-#endif
 		
 		// 
 		// See DataBoundControl.MarkAsDataBound msdn doc for the code example