예제 #1
0
        public TableFilter(string template)
        {
            string[] split;

            if (Regex.IsMatch(template, "[^=]+\\*=[^=]*"))
            {
                string data = "THExxQUICKxxBROWNxxFOX";

                split = template.Split(new string[] { "\\*=" }, StringSplitOptions.None);
                name  = split[0];
                value = split[1];
                type  = CheckPageTypes.MATCH;
                return;
            }
            if (Regex.IsMatch(template, "[^=]+~=[^=]*"))
            {
                split = template.Split(new string[] { "~=" }, StringSplitOptions.None);
                name  = split[0];
                value = split[1];
                type  = CheckPageTypes.CONTAINS;
                return;
            }
            if (Regex.IsMatch(template, "[^=] +=[^=] * "))
            {
                split = template.Split(new string[] { "=" }, StringSplitOptions.None);
                name  = split[0];
                value = split[1];
                type  = CheckPageTypes.EQUAL;
                return;
            }
            throw new ArgumentException("Wrong searchCriteria for Cells: " + template);
        }
예제 #2
0
 public void UpdatePageData(string url, string title, CheckPageTypes checkUrlType, CheckPageTypes checkTitleType, string urlTemplate)
 {
     if (_url == null)
         Url = url;
     if (Title == null)
         Title = title;
     CheckUrlType = checkUrlType;
     CheckTitleType = checkTitleType;
     UrlTemplate = urlTemplate;
 }
예제 #3
0
 public void UpdatePageData(string url, string title, CheckPageTypes checkUrlType, CheckPageTypes checkTitleType, string urlTemplate)
 {
     if (_url == null)
     {
         Url = url;
     }
     if (Title == null)
     {
         Title = title;
     }
     CheckUrlType   = checkUrlType;
     CheckTitleType = checkTitleType;
     UrlTemplate    = urlTemplate;
 }