Added dynamic wrapper support to IFileSystem to allow context specific implementations from which to hang extension methods upon (ie IMediaFileSystem)

This commit is contained in:
Matt@MBP13-PC
2012-08-20 09:42:32 -01:00
parent 847b3523a8
commit 3a2ed918de
18 changed files with 386 additions and 19 deletions

View File

@@ -14,10 +14,7 @@ namespace Umbraco.Core.IO
public PhysicalFileSystem(string virtualRoot)
{
if(HttpContext.Current == null)
throw new InvalidOperationException("The single parameter constructor can only be accessed when there is a valid HttpContext");
_rootPath = HttpContext.Current.Server.MapPath(virtualRoot);
_rootPath = System.Web.Hosting.HostingEnvironment.MapPath(virtualRoot);
_rootUrl = VirtualPathUtility.ToAbsolute(virtualRoot);
}