Author: kostat
Date: 2007-01-11 11:18:45 -0500 (Thu, 11 Jan 2007)
New Revision: 70862
Modified:
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/ObjectDataSource.cs
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs
Log:
merge -r 70860:70861
Modified:
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
---
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
2007-01-11 16:16:50 UTC (rev 70861)
+++
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
2007-01-11 16:18:45 UTC (rev 70862)
@@ -1,5 +1,12 @@
2007-01-10 Konstantin Triger <[EMAIL PROTECTED]>
+ * XmlDataSource.cs: refactored to use cached collection.
+ * SqlDataSource.cs: refactored to use cached collection;
+ don't throw exception on 'DefaultView'.
+ * ObjectDataSource.cs: refactored to use cached collection.
+
+2007-01-10 Konstantin Triger <[EMAIL PROTECTED]>
+
* ObjectDataSourceView.cs: consider parameter names and
DataObjectMethodAttribute during method resolution.
Modified:
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/ObjectDataSource.cs
===================================================================
---
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/ObjectDataSource.cs
2007-01-11 16:16:50 UTC (rev 70861)
+++
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/ObjectDataSource.cs
2007-01-11 16:18:45 UTC (rev 70862)
@@ -49,7 +49,7 @@
[ToolboxBitmap ("bitmap file goes here")]
public class ObjectDataSource : DataSourceControl
{
- static readonly string defaultViewName = "DefaultView";
+ static readonly string [] emptyNames = new string [] {
"DefaultView" };
ObjectDataSourceView defaultView;
int cacheDuration = 0;
@@ -72,7 +72,7 @@
ObjectDataSourceView DefaultView {
get {
if (defaultView == null)
- defaultView = new ObjectDataSourceView
(this, defaultViewName, Context);
+ defaultView = new ObjectDataSourceView
(this, emptyNames [0], Context);
return defaultView;
}
}
@@ -364,7 +364,7 @@
protected override ICollection GetViewNames ()
{
- return new string [] { defaultViewName };
+ return emptyNames;
}
public IEnumerable Select ()
Modified:
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs
===================================================================
---
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs
2007-01-11 16:16:50 UTC (rev 70861)
+++
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs
2007-01-11 16:18:45 UTC (rev 70862)
@@ -50,6 +50,8 @@
[DesignerAttribute
("System.Web.UI.Design.WebControls.SqlDataSourceDesigner, " +
Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
[DefaultEventAttribute ("Selecting")]
public class SqlDataSource : DataSourceControl {
+
+ static readonly string [] emptyNames = new string [] {
"DefaultView" };
public SqlDataSource ()
{
@@ -70,7 +72,7 @@
protected override DataSourceView GetView (string viewName)
{
- if (viewName == "" || viewName == null)
+ if (String.IsNullOrEmpty (viewName) || (String.Compare
(viewName, emptyNames [0], StringComparison.InvariantCultureIgnoreCase) == 0))
return View;
else
throw new ArgumentException ("viewName");
@@ -108,7 +110,7 @@
protected override ICollection GetViewNames ()
{
- return new string [] { "DefaultView" };
+ return emptyNames;
}
public int Insert ()
Modified:
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs
===================================================================
---
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs
2007-01-11 16:16:50 UTC (rev 70861)
+++
branches/mainsoft/gh20preview2/mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs
2007-01-11 16:18:45 UTC (rev 70862)
@@ -65,6 +65,7 @@
private bool _enableCaching = true;
private int _cacheDuration = 0;
private DataSourceCacheExpiry _cacheExpirationPolicy =
DataSourceCacheExpiry.Absolute;
+ static readonly string [] emptyNames = new string [] {
"DefaultView" };
event EventHandler IDataSource.DataSourceChanged {
add { ((IHierarchicalDataSource)this).DataSourceChanged
+= value; }
@@ -235,7 +236,7 @@
ICollection IDataSource.GetViewNames ()
{
- return new string [] { "DefaultView" };
+ return emptyNames;
}
[DefaultValue (0)]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches