public static string GetExecutionPath(IWebResource resource) { if (resource == null) { throw new ArgumentNullException(nameof(resource)); } var path = GetMapper(resource.GetType())(resource); var queryString = HttpContext.Current.Request.QueryString; if (queryString.AllKeys.Any()) { foreach (var key in queryString.AllKeys) { if (path.Contains(key + "=")) { continue; } if (!path.Contains("?")) { path += "?"; } else if (!path.EndsWith("&")) { path += "&"; } path += key + "=" + queryString[key]; } } return(path); }
public static bool AddWebResource(string prefix, IWebResource resource) { if (_resources.ContainsKey(prefix)) { return(false); } _resources.Add(prefix, resource); return(true); }
public WebKitResource(IWebResource resource) { this.Url = resource.url(); this.MimeType = resource.mimeType(); this.Encoding = resource.textEncodingName(); }
/// <summary> /// Determines if this web resource's Url matches a given path. /// </summary> public static bool Matches(this IWebResource resource, string path) { return(resource.GetUrl().Equals(path, StringComparison.OrdinalIgnoreCase)); }
public void AddResource(string path, IWebResource resource) { resources [path] = resource; }
public void AddDirectory(string path, IWebResource resource) { directories[path] = resource; }
public void AddResource(string path, IWebResource resource) { Debug.Log($"AddResource: {path}"); resources[path] = resource; }