bool PageIsOk(string page, SePatterns pagePattern) { bool notNull = page != null; bool ban = pagePattern.BanRx.IsMatch(page); bool ok = pagePattern.ValidRx.IsMatch(page); return(notNull && !ban && ok); }
public static void WipeCache() { Proxies = null; _rblPatterns = null; _sePatterns = null; _yaCheck = null; _GoogCheck = null; _anonChecks = null; GC.Collect(); }
public static void LoadSePatterns() { _sePatterns = LoadValidFileData(PATH.SEPatterns, 3, "[^?]"); foreach (var set in _sePatterns) { if (set[0] == "Ya") { _yaCheck = new SePatterns(set[1], set[2]); } else if (set[0] == "Goo") { _GoogCheck = new SePatterns(set[1], set[2]); } } }
public static void LoadSePatterns() { _sePatterns = LoadValidFileData(PATH.SEPatterns, 3, "[^?]"); foreach (var set in _sePatterns) { if (set[0] == "Ya") _yaCheck = new SePatterns(set[1], set[2]); else if (set[0] == "Goo") _GoogCheck = new SePatterns(set[1], set[2]); } }
bool PageIsOk(string page, SePatterns pagePattern) { bool notNull = page != null; bool ban = pagePattern.BanRx.IsMatch(page); bool ok = pagePattern.ValidRx.IsMatch(page); return notNull && !ban && ok; }