Simplifies all creation of UrlHelper, creates GetUmbracoApiServiceBaseUrl extensions for WebApi

This commit is contained in:
Shannon
2017-01-03 11:13:38 +11:00
parent ee925692e5
commit 790e30defd
10 changed files with 33 additions and 9 deletions

View File

@@ -71,7 +71,7 @@ namespace Umbraco.Web.WebServices
/// </remarks>
public UrlHelper Url
{
get { return _url ?? (_url = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()))); }
get { return _url ?? (_url = new UrlHelper(HttpContext.Current.Request.RequestContext)); }
}
/// <summary>

View File

@@ -72,7 +72,7 @@ namespace Umbraco.Web.WebServices
/// </remarks>
public UrlHelper Url
{
get { return _url ?? (_url = new UrlHelper(new RequestContext(new HttpContextWrapper(Context), new RouteData()))); }
get { return _url ?? (_url = new UrlHelper(Context.Request.RequestContext)); }
}
/// <summary>