2004-11-18 Lluis Sanchez Gual <lluis@novell.com>
authorLluis Sanchez <lluis@novell.com>
Thu, 18 Nov 2004 14:35:04 +0000 (14:35 -0000)
committerLluis Sanchez <lluis@novell.com>
Thu, 18 Nov 2004 14:35:04 +0000 (14:35 -0000)
* SiteMapHierarchicalDataSourceView.cs, SiteMapDataSource.cs: New files.
* SiteMapDataSourceView.cs: Minor fix.

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

mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/System.Web.UI.WebControls/SiteMapDataSource.cs [new file with mode: 0644]
mcs/class/System.Web/System.Web.UI.WebControls/SiteMapDataSourceView.cs
mcs/class/System.Web/System.Web.UI.WebControls/SiteMapHierarchicalDataSourceView.cs [new file with mode: 0644]

index 631c43eef23c77cd378599896d82cf20d199574b..c0ba1dc20fcc5a4ee18846cdb3da180d24d1e1ef 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-18 Lluis Sanchez Gual <lluis@novell.com>
+
+       * SiteMapHierarchicalDataSourceView.cs, SiteMapDataSource.cs: New files.
+       * SiteMapDataSourceView.cs: Minor fix.
+
 2004-11-18 Sanjay Gupta <gsanjay@novell.com>
 
        * SqlDataSourceView.cs: Updated ExecuteSelect method.
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/SiteMapDataSource.cs b/mcs/class/System.Web/System.Web.UI.WebControls/SiteMapDataSource.cs
new file mode 100644 (file)
index 0000000..1c8e838
--- /dev/null
@@ -0,0 +1,74 @@
+//
+// System.Web.UI.WebControls.SiteMapDataSource.cs
+//
+// Authors:
+//     Lluis Sanchez Gual (lluis@novell.com)
+//
+// (C) 2004 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
+
+using System;
+using System.Collections;
+using System.Web.UI;
+using System.ComponentModel;
+
+namespace System.Web.UI.WebControls
+{
+       public class SiteMapDataSource : HierarchicalDataSourceControl, IDataSource, IListSource
+       {
+               [MonoTODO]
+               public DataSourceView GetView (string viewName)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               [MonoTODO]
+               public ICollection GetViewNames ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               [MonoTODO]
+               public IList GetList ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               [MonoTODO]
+               public bool ContainsListCollection {
+                       get { throw new NotImplementedException (); }
+               }
+               
+               [MonoTODO]
+               public event EventHandler DataSourceChanged {
+                       add { throw new NotImplementedException (); }
+                       remove { throw new NotImplementedException (); }
+               }
+       }
+}
+
+#endif
+
index a0165dd315af1ebfa9e0d69cee90409fcc463f83..ea25762f9afdb551d2a45d2e9e32dddc45c305b8 100644 (file)
@@ -38,10 +38,12 @@ using System.Web.UI;
 
 namespace System.Web.UI.WebControls {
        public class SiteMapDataSourceView : DataSourceView {
-               public SiteMapDataSourceView (SiteMapNode node) : this (new SiteMapNodeCollection (node)) {}
-               public SiteMapDataSourceView (SiteMapNodeCollection collection)
+               public SiteMapDataSourceView (SiteMapDataSource owner, string viewName, SiteMapNode node) : this (owner, viewName, new SiteMapNodeCollection (node)) {}
+               public SiteMapDataSourceView (SiteMapDataSource owner, string viewName, SiteMapNodeCollection collection)
                {
                        this.collection = collection;
+                       this.viewName = viewName;
+                       this.owner = owner;
                }
                
                [MonoTODO]
@@ -64,6 +66,8 @@ namespace System.Web.UI.WebControls {
                }
 
                SiteMapNodeCollection collection;
+               string viewName;
+               SiteMapDataSource owner;
        }
 }
 #endif
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/SiteMapHierarchicalDataSourceView.cs b/mcs/class/System.Web/System.Web.UI.WebControls/SiteMapHierarchicalDataSourceView.cs
new file mode 100644 (file)
index 0000000..8de1b8d
--- /dev/null
@@ -0,0 +1,54 @@
+//
+// System.Web.UI.WebControls.SiteMapHierarchicalDataSourceView
+//
+// Authors:
+//     Lluis Sanchez Gual (lluis@novell.com)
+//
+// (C) 2004 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
+using System.Collections;
+
+namespace System.Web.UI.WebControls
+{
+       public class SiteMapHierarchicalDataSourceView : HierarchicalDataSourceView
+       {
+               public SiteMapHierarchicalDataSourceView (SiteMapNode node) : this (new SiteMapNodeCollection (node)) {}
+               public SiteMapHierarchicalDataSourceView (SiteMapNodeCollection collection)
+               {
+                       this.collection = collection;
+               }
+
+               [MonoTODO]
+               public override IHierarchicalEnumerable Select ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               SiteMapNodeCollection collection;
+       }
+}
+#endif
+