Esempio n. 1
0
 //- @GetQueryStringVariableMap -//
 public static Map GetQueryStringVariableMap(SelectorType type, String matchText, String target, out String newTarget)
 {
     newTarget = target;
     var ex = new Regex(UrlCleaner.CleanWebPathHead(matchText), RegexOptions.IgnoreCase);
     String path = GetReference(type);
     Match m = ex.Match(path);
     if (m.Groups.Count > 1)
     {
         for (Int32 i = 1; i < m.Groups.Count; i++)
         {
             Group g = m.Groups[i];
             newTarget = newTarget.Replace("$" + i.ToString(CultureInfo.CurrentCulture), g.Value);
         }
     }
     String queryString = String.Empty;
     Map map = null;
     Int32 pageIndex = newTarget.IndexOf("?", StringComparison.OrdinalIgnoreCase);
     if (pageIndex > -1)
     {
         queryString = newTarget.Substring(pageIndex + 1, newTarget.Length - pageIndex - 1);
         map = new Map();
         map.AddQueryString(queryString);
     }
     //+
     return map;
 }