public void Add(ExtractResultCollection collection)
 {
     foreach (var r in collection)
     {
         Add(r);
     }
 }
Ejemplo n.º 2
0
        public static ExtractResultCollection Extract(string content, ExtractBlockCollection collection)
        {
            var results = new ExtractResultCollection();

            foreach (var block in collection)
            {
                var r = Extract(content, block);
                results.Add(r);
            }

            return(results);
        }
Ejemplo n.º 3
0
        public static ExtractResultCollection ExtractSelector(string content, ExtractBase extractBase)
        {
            var pr = ProcessorFactory.Process(content, extractBase.Selectors);

            var results = new ExtractResultCollection();

            foreach (var m in pr.Matches)
            {
                var result = new ExtractResult
                {
                    Name    = "tile",
                    Content = m
                };

                results.Add(result);
            }

            return(results);
        }
Ejemplo n.º 4
0
        public static ExtractResultCollection ExtractTile(string content, ExtractTile tile)
        {
            var pr = ProcessorFactory.Process(content, tile.Selectors);

            var results = new ExtractResultCollection();

            foreach (var m in pr.Matches)
            {
                var result = new ExtractResult
                {
                    Name    = "tile",
                    Content = m
                };

                if (tile.Metas.Count > 0)
                {
                    result.Metas = ExtractMeta(m, tile.Metas);
                }

                results.Add(result);
            }

            return(results);
        }