* StaticSiteMapProvider.cs (UrlToNode): this entire file is #if
authorChris Toshok <toshok@novell.com>
Fri, 10 Mar 2006 18:44:19 +0000 (18:44 -0000)
committerChris Toshok <toshok@novell.com>
Fri, 10 Mar 2006 18:44:19 +0000 (18:44 -0000)
NET_2_0, no need to embed another #if NET_2_0.

* SiteMapProvider.cs (AddNode): throw NotImplementedException.
(FindSiteMapNode): with null context, return null.  don't throw
ArgumentNullException.
(RemoveNode): throw NotImplementedException.
(IsAccessibleToUser): check arguments to make test pass.  still
lacking the method's actual functionality.
(ResourceKey): add missing property.

2006-03-10  Chris Toshok  <toshok@ximian.com>

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

mcs/class/System.Web/System.Web/ChangeLog
mcs/class/System.Web/System.Web/SiteMapProvider.cs
mcs/class/System.Web/System.Web/StaticSiteMapProvider.cs

index 4a87fd35d7d23d245c1afeefed5a91c38b6d73f4..3ec5baa5bb7fd966d47045973c11dc972f392f4e 100644 (file)
@@ -1,3 +1,16 @@
+2006-03-10  Chris Toshok  <toshok@ximian.com>
+
+       * StaticSiteMapProvider.cs (UrlToNode): this entire file is #if
+       NET_2_0, no need to embed another #if NET_2_0.
+
+       * SiteMapProvider.cs (AddNode): throw NotImplementedException.
+       (FindSiteMapNode): with null context, return null.  don't throw
+       ArgumentNullException.
+       (RemoveNode): throw NotImplementedException.
+       (IsAccessibleToUser): check arguments to make test pass.  still
+       lacking the method's actual functionality.
+       (ResourceKey): add missing property.
+
 2006-03-10  Chris Toshok  <toshok@ximian.com>
 
        * HttpRequest.cs (CheckString): add back in the check for \xff1c
index b427c39919293ba84937c358e2ad90f6a78d6511..997cd557f04259f97e027e1517f92a3584437259 100644 (file)
@@ -55,14 +55,13 @@ namespace System.Web {
                
                internal protected virtual void AddNode (SiteMapNode node, SiteMapNode parentNode)
                {
-                       if (node == null)
-                               throw new ArgumentNullException ("node");
+                       throw new NotImplementedException ();
                }
 
                public virtual SiteMapNode FindSiteMapNode (HttpContext context)
                {
                        if (context == null)
-                               throw new ArgumentNullException ("context");
+                               return null;
                        
                        SiteMapNode ret = this.FindSiteMapNode (context.Request.RawUrl);
                        if (ret == null)
@@ -82,8 +81,6 @@ namespace System.Web {
 
                public abstract SiteMapNodeCollection GetChildNodes (SiteMapNode node);
                
-               public abstract SiteMapNode GetParentNode (SiteMapNode node);
-               
                public virtual SiteMapNode GetCurrentNodeAndHintAncestorNodes (int upLevel)
                {
                        if (upLevel < -1) throw new ArgumentOutOfRangeException ("upLevel");
@@ -98,6 +95,8 @@ namespace System.Web {
                        
                        return CurrentNode;
                }
+
+               public abstract SiteMapNode GetParentNode (SiteMapNode node);
                
                public virtual SiteMapNode GetParentNodeRelativeToCurrentNodeAndHintDownFromParent (int walkupLevels, int relativeDepthFromWalkup)
                {
@@ -152,8 +151,7 @@ namespace System.Web {
                
                protected virtual void RemoveNode (SiteMapNode node)
                {
-                       if (node == null)
-                               throw new ArgumentNullException("node");
+                       throw new NotImplementedException ();
                }
 
                public override void Initialize (string name, NameValueCollection attributes)
@@ -166,6 +164,9 @@ namespace System.Web {
                [MonoTODO]
                public virtual bool IsAccessibleToUser (HttpContext context, SiteMapNode node)
                {
+                       if (context == null) throw new ArgumentNullException ("context");
+                       if (node == null) throw new ArgumentNullException ("node");
+
                        return true;
                }
                
@@ -225,6 +226,12 @@ namespace System.Web {
                        get { return securityTrimming; }
                }
 
+               string resourceKey;
+               public string ResourceKey {
+                       get { return resourceKey; }
+                       set { resourceKey = value; }
+               }
+
                public virtual SiteMapNode RootNode {
                        get {
                                SiteMapNode node = GetRootNodeCore ();
@@ -234,7 +241,7 @@ namespace System.Web {
                                        return null;
                        }
                }
-       
+
                public event SiteMapResolveEventHandler SiteMapResolve;
        }
 }
index 474ece1c7bc4ea404a60d290672c4822b1d7b199..658d5af3c844f40ce5415e48303a87e9bf096368 100644 (file)
@@ -103,14 +103,7 @@ namespace System.Web
                        get {
                                lock (this) {
                                        if (urlToNode == null) {
-#if NET_2_0
                                                urlToNode = new Hashtable (StringComparer.InvariantCultureIgnoreCase);
-#else
-                                               urlToNode = new Hashtable (
-                                                       CaseInsensitiveHashCodeProvider.DefaultInvariant,
-                                                       CaseInsensitiveComparer.DefaultInvariant
-                                               );
-#endif
                                        }
                                }
                                return urlToNode;