public bool Execut(string url, QueryString queryString) { if (mItems.Count == 0) { return(url == mTemplate); } else { int offset = mOffset; for (int i = 0; i < mItems.Count; i++) { MatchItem item = mItems[i]; string value; var count = item.Match(url, offset, out value); if (count <= 0) { return(false); } queryString.Add(item.Name, value); offset += count; } return(true); } }
public bool Execute(string url, Dictionary <string, string> parameters) { if (mItems.Count == 0) { return(url == mTemplate); } else { int offset = mOffset; for (int i = 0; i < mItems.Count; i++) { MatchItem item = mItems[i]; string value; var count = item.Match(url, offset, out value); if (count <= 0) { return(false); } parameters[item.Name] = value; offset += count; } return(true); } }