예제 #1
0
        public static string ToAbsoluteUri(this string relativeUrl, IRequest req = null)
        {
            if (req == null)
            {
                req = HostContext.TryGetCurrentRequest();
            }

            var absoluteUrl = HostContext.ResolveAbsoluteUrl("~/".CombineWith(relativeUrl), req);

            return(absoluteUrl);
        }
예제 #2
0
 public static string ResolveBaseUrl(this IRequest httpReq)
 {
     return(HostContext.ResolveAbsoluteUrl("~/", httpReq));
 }
예제 #3
0
 public static string ResolveAbsoluteUrl(this IRequest httpReq, string url)
 {
     return(HostContext.ResolveAbsoluteUrl(url, httpReq));
 }
 public static string ResolveAbsoluteUrl(this IRequest httpReq, string virtualPath = null)
 {
     return(HostContext.ResolveAbsoluteUrl(virtualPath ?? "~".CombineWith(httpReq.RawUrl), httpReq));
 }