public List <WorldMarket> GetValuesIndexParents(string block)
        {
            var lstWorldMarket = new List <WorldMarket>();


            var blockMarkets = "";

            for (var i = 0; i < _abbreviation.Count; i++)
            {
                var worldMarket = new WorldMarket();

                if (i == _abbreviation.Count - 1)
                {
                    blockMarkets = _scrapParser.ScrapBlockPage(
                        block, $"<tr><th colspan=\"2\" class=\"height\"><span class=\"main_title\"><a href=\"p.php?pid=exame_quote&symbol={_abbreviation[i]}",
                        "<span class=\"by\"><a class=\"color_black font_bold\" href=\"http://br.advfn.com\">Cotações e Gráficos fornecidos por ");
                }
                else
                {
                    blockMarkets = _scrapParser.ScrapBlockPage(
                        block, $"<tr><th colspan=\"2\" class=\"height\"><span class=\"main_title\"><a href=\"p.php?pid=exame_quote&symbol={_abbreviation[i]}",
                        $"<th colspan=\"2\" class=\"height\"><span class=\"main_title\"><a href=\"p.php?pid=exame_quote&symbol={_abbreviation[i + 1]}");
                }

                worldMarket.Point = _scrapParser.ScrapBlockPage(
                    blockMarkets, "<td><span>Pontos</span> <span><big>",
                    "</big></span></td>");

                worldMarket.Index = _scrapParser.ScrapBlockPage(
                    blockMarkets, $"</a></span><span class=\"name\"><a href=\"p.php?pid=exame_quote&symbol={_abbreviation[i]}\">",
                    "</a></span></th>	</tr>");

                worldMarket.Hour = _scrapParser.ScrapBlockPage(
                    blockMarkets, "</span><br>Hora ",
                    $"</td>\n\t\t</tr>\n\t\t<tr><td colspan=\"2\"><a href=\"p.php?pid=exame_quote&symbol={_abbreviation[i]}\">");

                worldMarket.Parents = _scrapParser.ScrapBlockPage(
                    blockMarkets, "\"\">",
                    $"</a></span><span class=\"name\"><a href=\"p.php?pid=exame_quote&symbol={_abbreviation[i]}\">");

                var sublockVariation = _scrapParser.ScrapBlockPage(
                    blockMarkets, "<td class=\"info_perc\">",
                    "<br>");

                worldMarket.Variation = _scrapParser.ScrapBlockPage(
                    sublockVariation, "'>",
                    "</span>");

                lstWorldMarket.Add(worldMarket);
            }
            return(lstWorldMarket);
        }
 public void EditPortfolio(string portfolioID, string name, IEnumerable <YID> items, IEnumerable <YIndexID> indices)
 {
     this.EditPortfolio(portfolioID, name, WorldMarket.GetDefaultCurrencyByID("USD"), false, false, items, indices);
 }
 public Response <Portfolio> CreatePortfolio(string name, IEnumerable <YID> items, IEnumerable <YIndexID> indices)
 {
     return(this.CreatePortfolio(name, WorldMarket.GetDefaultCurrencyByID("USD"), false, false, items, indices));
 }
Esempio n. 4
0
 public void CreatePortfolioAsync(string name, IEnumerable <YID> items, IEnumerable <YIndexID> indices, object userArgs)
 {
     this.CreatePortfolioAsync(name, WorldMarket.GetDefaultCurrencyByID("USD"), false, false, items, indices, userArgs);
 }