public void LoadURLPattern(URLPattern urlPattern) { AddURLPattern(urlPattern); if (OnThroughMePatternsChanged != null) { OnThroughMePatternsChanged(this, new ThroughMePatternsChangedEventHandlerArgs()); } }
private void AddURLPattern(URLPattern urlPattern) { throughMePatterns.Add(urlPattern); if (urlPattern.NeedValidation) { needValidatePatterns.Add(urlPattern); } }
public void LoadURLPattern(string urlPattern, IEnumerable <string> necessaryKeywords, IEnumerable <string> forbiddenKeywords) { URLPattern upr = new URLPattern(urlPattern); if (necessaryKeywords != null) { upr.NeedValidation = true; foreach (string s in necessaryKeywords) { upr.NecessaryKeywords.Add(s); } } if (forbiddenKeywords != null) { upr.NeedValidation = true; foreach (string s in forbiddenKeywords) { upr.ForbiddenKeywords.Add(s); } } LoadURLPattern(upr); }