Example #1
0
 public Bottle(BottleBuilder builder, HtmlNode row)
 {
     foreach (string s in m_valueKeys)
     {
         m_bottleValues.Add(s, builder.GetStringFromRow(s, row));
     }
 }
Example #2
0
        public static Cellar BuildFromDocument(HtmlDocument doc)
        {
            BottleBuilder builder = new BottleBuilder();

            builder.SetColumns(doc);

            HtmlNodeCollection nodes  = doc.DocumentNode.SelectNodes("//tr");
            Cellar             cellar = new Cellar();

            foreach (HtmlNode node in nodes)
            {
                if (node.ChildNodes[0].Name == "th")
                {
                    continue;
                }

                Bottle bottle = builder.BuildBottleFromRow(node);

                cellar.m_bottles.Add(bottle.Barcode, bottle);
            }
            return(cellar);
        }