private string GetPathFromUri(Uri path) { switch (path.Scheme) { case "file": return(path.AbsolutePath); case "pack": return(NeutroniumResourceHandler.UpdatePackUrl(path)); default: return(path.ToString()); } }
private void UpdateClientSideRouteIfNeeded(Uri path) { if (!isPack(path) || (string.IsNullOrEmpty(path.Fragment))) { return; } void UpdateLocation(object _, BeforeJavascriptExcecutionArgs e) { BeforeJavascriptExecuted -= UpdateLocation; e.JavascriptExecutor($"window.location.href = '{NeutroniumResourceHandler.GetFullPackUrl(path)}';"); } BeforeJavascriptExecuted += UpdateLocation; }