Пример #1
0
 public WebSearchProvider(
     ILoader <HtmlDocument> loader,
     ISpliter <HtmlDocument, HtmlNode> spliter,
     IBuilder <HtmlNode> builder)
 {
     _loader  = loader;
     _spliter = spliter;
     _builder = builder;
 }
Пример #2
0
 public WebSearchProvider(
     ILoader<HtmlDocument> loader,
     ISpliter<HtmlDocument, HtmlNode> spliter,
     IBuilder<HtmlNode> builder)
 {
     _loader  = loader;
     _spliter = spliter;
     _builder = builder;
 }
Пример #3
0
 public static bool TryParse(string args, out Flag flag)
 {
     try
     {
         flag = new Flag();
         ISpliter spliter = SpliterFactory.CreateSpilter(args);
         var      results = spliter.Splite(args);
         foreach (var arg in results)
         {
             var p = ParserFactory.CreateParser(arg);
             flag._flagItems.Add(p.Parse(arg));
         }
         return(true);
     }
     catch
     {
         flag = null;
         return(false);
     }
 }