Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Util
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23167/src/Spring/Spring.Web/Util
Modified Files:
IVirtualEnvironment.cs VirtualEnvironment.cs
Log Message:
fixed SPRNET-872
Index: VirtualEnvironment.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Util/VirtualEnvironment.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** VirtualEnvironment.cs 2 Aug 2007 20:49:59 -0000 1.4
--- VirtualEnvironment.cs 14 Mar 2008 12:02:45 -0000 1.5
***************
*** 82,86 ****
public string ApplicationVirtualPath
{
! get { return HttpRuntime.AppDomainAppVirtualPath; }
}
--- 82,90 ----
public string ApplicationVirtualPath
{
! get {
! string appPath = HttpRuntime.AppDomainAppVirtualPath;
! if (!appPath.EndsWith("/")) appPath = appPath + "/";
! return appPath;
! }
}
***************
*** 90,93 ****
--- 94,101 ----
}
+ public string CurrentVirtualFilePath
+ {
+ get { return HttpContext.Current.Request.FilePath; }
+ }
public string CurrentExecutionFilePath
***************
*** 116,120 ****
}
#endif
! throw new ArgumentException("cant map context relative path outside a context");
}
}
--- 124,128 ----
}
#endif
! throw new ArgumentException("can't map context relative path outside a context");
}
}
***************
*** 123,127 ****
/// <summary>
! /// The virtual (rooted) path of the current Application
/// </summary>
public static string ApplicationVirtualPath
--- 131,135 ----
/// <summary>
! /// The virtual (rooted) path of the current Application containing a leading '/' as well as a trailing '/'
/// </summary>
public static string ApplicationVirtualPath
***************
*** 131,135 ****
/// <summary>
! /// The virtual (rooted) path of the current Request
/// </summary>
public static string CurrentVirtualPath
--- 139,143 ----
/// <summary>
! /// The virtual (rooted) path of the current Request including <see cref="HttpRequest.PathInfo"/>
/// </summary>
public static string CurrentVirtualPath
***************
*** 139,142 ****
--- 147,158 ----
/// <summary>
+ /// The virtual (rooted) path of the current Request without trailing <see cref="HttpRequest.PathInfo"/>
+ /// </summary>
+ public static string CurrentVirtualFilePath
+ {
+ get { return instance.CurrentVirtualFilePath; }
+ }
+
+ /// <summary>
/// The virtual (rooted) path of the currently executing script
/// </summary>
Index: IVirtualEnvironment.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Util/IVirtualEnvironment.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** IVirtualEnvironment.cs 29 May 2007 18:19:08 -0000 1.3
--- IVirtualEnvironment.cs 14 Mar 2008 12:02:45 -0000 1.4
***************
*** 40,51 ****
{
/// <summary>
! /// The virtual (rooted) path of the current Application
/// </summary>
string ApplicationVirtualPath { get; }
/// <summary>
! /// The virtual (rooted) path of the current Request
/// </summary>
string CurrentVirtualPath { get; }
!
/// <summary>
/// The virtual (rooted) path of the currently executing script
--- 40,57 ----
{
/// <summary>
! /// The virtual (rooted) path of the current Application with trailing slash
/// </summary>
+ /// <remarks>
+ /// For the site rooted applications, "/" will be returned, for all others "/..someappdir../"
+ /// </remarks>
string ApplicationVirtualPath { get; }
/// <summary>
! /// The virtual (rooted) path of the current Request including <see cref="HttpRequest.PathInfo"/>
/// </summary>
string CurrentVirtualPath { get; }
! /// <summary>
! /// The virtual (rooted) path of the current Request without trailing <see cref="HttpRequest.PathInfo"/>
! /// </summary>
! string CurrentVirtualFilePath { get; }
/// <summary>
/// The virtual (rooted) path of the currently executing script
***************
*** 57,61 ****
/// </remarks>
string CurrentExecutionFilePath { get; }
-
/// <summary>
/// Maps a virtual path to it's physical location
--- 63,66 ----
|