Author: toshok
Date: 2005-11-01 21:08:08 -0500 (Tue, 01 Nov 2005)
New Revision: 52464

Added:
   trunk/mcs/class/System.Web/System.Web/VirtualPathUtility.cs
Modified:
   trunk/mcs/class/System.Web/System.Web/ChangeLog
Log:
2005-11-01  Chris Toshok  <[EMAIL PROTECTED]>

        * VirtualPathUtility.cs: new (partial implementation) to get some
        MS provider examples compiling.



Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog     2005-11-02 01:15:39 UTC 
(rev 52463)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog     2005-11-02 02:08:08 UTC 
(rev 52464)
@@ -1,3 +1,8 @@
+2005-11-01  Chris Toshok  <[EMAIL PROTECTED]>
+
+       * VirtualPathUtility.cs: new (partial implementation) to get some
+       MS provider examples compiling.
+
 2005-10-31 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * HttpContext.cs: added a new internal overload for ClearError.

Added: trunk/mcs/class/System.Web/System.Web/VirtualPathUtility.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/VirtualPathUtility.cs 2005-11-02 
01:15:39 UTC (rev 52463)
+++ trunk/mcs/class/System.Web/System.Web/VirtualPathUtility.cs 2005-11-02 
02:08:08 UTC (rev 52464)
@@ -0,0 +1,130 @@
+//
+// System.Web.VirtualPathUtility.cs
+//
+// Author:
+//     Chris Toshok ([EMAIL PROTECTED])
+//
+
+//
+// Copyright (C) 2005 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.Web.Util;
+
+namespace System.Web {
+
+       public static class VirtualPathUtility
+       {
+               public static string AppendTrailingSlash (string virtualPath)
+               {
+                       if (virtualPath == null || virtualPath == "" || 
virtualPath.EndsWith ("/"))
+                               return virtualPath;
+
+                       return virtualPath + "/";
+               }
+
+               [MonoTODO ("more work here")]
+               public static string Combine (string basePath, string 
relativePath)
+               {
+                       if (!IsAbsolute (basePath))
+                               throw new ArgumentException ();
+
+                       if (basePath.EndsWith ("/"))
+                               return basePath + relativePath;
+
+                       return UrlUtils.Combine (basePath, relativePath);
+               }
+
+               [MonoTODO]
+               public static string GetDirectory (string virtualPath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static string GetExtension (string virtualPath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static string GetFileName (string virtualPath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static bool IsAbsolute (string virtualPath)
+               {
+                       if (virtualPath == "" || virtualPath == null)
+                               throw new ArgumentNullException ();
+
+                       return virtualPath.StartsWith ("/");
+               }
+
+               [MonoTODO]
+               public static bool IsAppRelative (string virtualPath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static string MakeRelative (string fromPath, string 
toPath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static string RemoveTrailingSlash (string virtualPath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static string ToAbsolute (string virtualPath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static string ToAbsolute (string virtualPath, string 
applicationPath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static string ToAppRelative (string virtualPath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static string ToAppRelative (string virtualPath, string 
applicationPath)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+
+}
+
+#endif

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to