In System.Web.UI:
authorChris Toshok <toshok@novell.com>
Mon, 27 Feb 2006 18:25:36 +0000 (18:25 -0000)
committerChris Toshok <toshok@novell.com>
Mon, 27 Feb 2006 18:25:36 +0000 (18:25 -0000)
2006-02-27  Chris Toshok  <toshok@ximian.com>

* DataSourceView.cs: Name isn't virtual.

* DataSourceControl.cs: beat this class over the head with the
corcompare stick.

* DataSourceControlBuilder.cs: new stubbed control builder for
DataSourceControl.

In System.Web.UI.WebControls:
2006-02-27  Chris Toshok  <toshok@ximian.com>

* SqlDataSource.cs: track change to DataSourceControl's protected
methods.

* AccessDataSource.cs: same.

svn path=/trunk/mcs/; revision=57342

mcs/class/System.Web/System.Web.UI.WebControls/AccessDataSource.cs
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs
mcs/class/System.Web/System.Web.UI/ChangeLog
mcs/class/System.Web/System.Web.UI/DataSourceControl.cs
mcs/class/System.Web/System.Web.UI/DataSourceControlBuilder.cs [new file with mode: 0644]
mcs/class/System.Web/System.Web.UI/DataSourceView.cs
mcs/class/System.Web/System.Web.dll.sources

index 098520a170407dcb6d4fee3a2d46f8f1068818d8..10cbe3cb5dc042f5275c9b3cca0ff94849e54290 100644 (file)
@@ -73,7 +73,7 @@ namespace System.Web.UI.WebControls {
 
                void ViewChanged (object source, EventArgs e)
                {
-                       OnDataSourceChanged (e);
+                       RaiseDataSourceChangedEvent (e);
                }
 
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
index 86fe8aab54f97769bbcc3e8dff975ab40598a82d..0c45e7f2f951d060105a667c823fa9ad23d54c2a 100644 (file)
@@ -1,3 +1,10 @@
+2006-02-27  Chris Toshok  <toshok@ximian.com>
+
+       * SqlDataSource.cs: track change to DataSourceControl's protected
+       methods.
+
+       * AccessDataSource.cs: same.
+
 2006-02-27  Vladimir Krasnov  <vladimirk@mainsoft.com>
 
        * ListControl.cs: fixed SelectedIndex property, fixed selection
index 16cce553efe205a3d094312f579c95a7db60f96f..069795afe35042ad73f35d2208f7999d72a4c6e6 100644 (file)
@@ -398,7 +398,7 @@ namespace System.Web.UI.WebControls {
                
                void ViewChanged (object source, EventArgs e)
                {
-                       OnDataSourceChanged (e);
+                       RaiseDataSourceChangedEvent (e);
                }
        }
 }
index 200ceff2b40a74a9a6d923b3fded9df1fd13c614..d095829ff9cf9343cd0799a96897764c92afef05 100644 (file)
@@ -1,3 +1,13 @@
+2006-02-27  Chris Toshok  <toshok@ximian.com>
+
+       * DataSourceView.cs: Name isn't virtual.
+
+       * DataSourceControl.cs: beat this class over the head with the
+       corcompare stick.
+
+       * DataSourceControlBuilder.cs: new stubbed control builder for
+       DataSourceControl.
+
 2006-02-23  Chris Toshok  <toshok@ximian.com>
 
        * Page.cs: more corcompare work.
index ba0914d26367e2a5cc8e04ecb6de3c725fe068c7..98a47c9d1db392bf5a0bb749d50faf79da389c95 100644 (file)
 #if NET_2_0
 using System.Collections;
 using System.Collections.Specialized;
+using System.ComponentModel;
 using System.Text;
 
 namespace System.Web.UI {
+
+       [DesignerAttribute ("System.Web.UI.Design.DataSourceDesigner, " + Consts.AssemblySystem_Design,
+                           "System.ComponentModel.Design.IDesigner")]
+       [ControlBuilderAttribute (typeof (DataSourceControlBuilder))]
+       [NonVisualControlAttribute]
+       [BindableAttribute (false)]
        public abstract class DataSourceControl : Control, IDataSource, System.ComponentModel.IListSource {
 
 
@@ -41,15 +48,33 @@ namespace System.Web.UI {
                {
                }
                
+               [MonoTODO]
+               [EditorBrowsable (EditorBrowsableState.Never)]
+               public override void ApplyStyleSheetSkin (Page page)
+               {
+                       throw new NotImplementedException ();
+               }
+
                protected override ControlCollection CreateControlCollection ()
                {
                        return new EmptyControlCollection (this);
                }
-               
-               protected virtual DataSourceView GetView (string viewName)
+
+               [MonoTODO ("why override?")]
+               [EditorBrowsable (EditorBrowsableState.Never)]
+               public override Control FindControl (string id)
                {
-                       return null;
+                       return base.FindControl (id);
+               }
+
+               [MonoTODO ("why override?")]
+               [EditorBrowsable (EditorBrowsableState.Never)]
+               public override void Focus ()
+               {
+                       base.Focus();
                }
+
+               protected abstract DataSourceView GetView (string viewName);
                
                DataSourceView IDataSource.GetView (string viewName)
                {
@@ -71,13 +96,64 @@ namespace System.Web.UI {
                        return ListSourceHelper.GetList (this);
                }
                
+               [MonoTODO ("why override?")]
+               [EditorBrowsable (EditorBrowsableState.Never)]
+               public override bool HasControls ()
+               {
+                       return base.HasControls ();
+               }
+
+               protected virtual void RaiseDataSourceChangedEvent (EventArgs e)
+               {
+                       EventHandler eh = Events [dataSourceChanged] as EventHandler;
+                       if (eh != null)
+                               eh (this, e);
+               }
+
+               [MonoTODO ("why override?")]
+               [EditorBrowsable (EditorBrowsableState.Never)]
+               public override void RenderControl (HtmlTextWriter tw)
+               {
+                       base.RenderControl (tw);
+               }
+
+               [MonoTODO ("why override?")]
+               [EditorBrowsable (EditorBrowsableState.Never)]
+               public override string ClientID {
+                       get { return base.ClientID; }
+               }
+
+               [MonoTODO ("why override?")]
+               [EditorBrowsable (EditorBrowsableState.Never)]
+               public override ControlCollection Controls {
+                       get { return base.Controls; }
+               }
+
+               [MonoTODO ("why override?")]
+               [DefaultValue (false)]
+               [Browsable (false)]
+               [EditorBrowsable (EditorBrowsableState.Never)]
+               public override bool EnableTheming {
+                       get { return base.EnableTheming; }
+                       set { base.EnableTheming = value; }
+               }
+
+               [MonoTODO ("why override?")]
+               [DefaultValue ("")]
+               [Browsable (false)]
+               [EditorBrowsable (EditorBrowsableState.Never)]
+               public override string SkinID {
+                       get { return base.SkinID; }
+                       set { base.SkinID = value; }
+               }
+
                bool System.ComponentModel.IListSource.ContainsListCollection {
                        get { return ListSourceHelper.ContainsListCollection (this); }
                }
 
-               //public override bool EnablePersonalization { get; set; }
-               //public override bool EnableTheming { get; set; }
-               //public override string SkinID { get; set; }
+               [Browsable (false)]
+               [EditorBrowsable (EditorBrowsableState.Never)]
+               [DefaultValue (false)]
                public override bool Visible { 
                        get { return false; }
                        set { throw new NotSupportedException (); }
@@ -88,13 +164,7 @@ namespace System.Web.UI {
                        add { Events.AddHandler (dataSourceChanged, value); }
                        remove { Events.RemoveHandler (dataSourceChanged, value); }
                }
-               
-               protected virtual void OnDataSourceChanged (EventArgs e)
-               {
-                       EventHandler eh = Events [dataSourceChanged] as EventHandler;
-                       if (eh != null)
-                               eh (this, e);
-               }
+
        }
 }
 #endif
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceControlBuilder.cs b/mcs/class/System.Web/System.Web.UI/DataSourceControlBuilder.cs
new file mode 100644 (file)
index 0000000..97f8b07
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// System.Web.UI.DataSourceControlBuilder.cs
+//
+// Authors:
+//   Chris Toshok (toshok@ximian.com)
+//
+// (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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 NET_2_0
+
+namespace System.Web.UI {
+
+       public sealed class DataSourceControlBuilder : ControlBuilder
+       {
+       }
+
+}
+#endif
index ddcca295f05db9904f2e514285f5728b787e73f6..fa8efa1ce84c09d367c8d8a6ebd36c35714c6a04 100644 (file)
@@ -182,7 +182,7 @@ namespace System.Web.UI {
                        return eventsList != null;
                }
 
-               public virtual string Name { 
+               public string Name { 
                        get { return viewName; } 
                }
 
index 98f6bef02a1ed824f7c525b136eef84e2fe0f7e2..ea60db9921ef2c84d760fe95e94bb83750f26cd0 100644 (file)
@@ -468,6 +468,7 @@ System.Web.UI/DataBoundLiteralControl.cs
 System.Web.UI/DataSourceCacheExpiry.cs
 System.Web.UI/DataSourceCapabilities.cs
 System.Web.UI/DataSourceControl.cs
+System.Web.UI/DataSourceControlBuilder.cs
 System.Web.UI/DataSourceOperation.cs
 System.Web.UI/DataSourceSelectArguments.cs
 System.Web.UI/DataSourceView.cs