AssetPackager.Helpers.UrlHelper.ResolveAbsoluteUrl C# (CSharp) Méthode

ResolveAbsoluteUrl() private méthode

private ResolveAbsoluteUrl ( string relativePath ) : string
relativePath string
Résultat string
		public static string ResolveAbsoluteUrl(string relativePath)
		{
			if (relativePath[0] != '~') return relativePath;

			string appPath = HttpContext.Current.Request.ApplicationPath == "/"
			                 	? "/"
			                 	: HttpContext.Current.Request.ApplicationPath + "/";
			return HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) + appPath + relativePath.Substring(2);
		}
	}