static string CreateResourceUrl (KeyedHashAlgorithm kha, string assemblyName, string assemblyNameHash, string assemblyPath, string resourceNameHash, bool debug, bool notifyScriptLoaded)
{
string atime = String.Empty;
string extra = String.Empty;
#if SYSTEM_WEB_EXTENSIONS
extra = QueryParamSeparator + "n=" + (notifyScriptLoaded ? "t" : "f");
#endif
#if TARGET_JVM
atime = QueryParamSeparator + "t=" + assemblyName.GetHashCode ();
#else
if (!String.IsNullOrEmpty (assemblyPath) && File.Exists (assemblyPath))
atime = QueryParamSeparator + "t=" + File.GetLastWriteTimeUtc (assemblyPath).Ticks;
else
atime = QueryParamSeparator + "t=" + DateTime.UtcNow.Ticks;
#endif
string d = assemblyNameHash + "_" + resourceNameHash + (debug ? "_t" : "_f");
string href = HandlerFileName + "?d=" + d + atime + extra;
HttpContext ctx = HttpContext.Current;
HttpRequest req = ctx != null ? ctx.Request : null;
if (req != null) {
string appPath = VirtualPathUtility.AppendTrailingSlash (req.ApplicationPath);
href = appPath + href;
}
return href;
}