Exemplo n.º 1
0
        public string Get()
        {
            //
            CryptoFeed.EnsureBackground();

            //
            if (CryptoFeed.CurrentPrices == null)
            {
                return("");
            }
            string serialized = Newtonsoft.Json.JsonConvert.SerializeObject(
                CryptoFeed.CurrentPrices, Newtonsoft.Json.Formatting.Indented);
            string formatted = Common.FormatJson(serialized);

            //
            return(formatted);
        }
Exemplo n.º 2
0
        public IActionResult Get()
        {
            //
            CryptoFeed.EnsureBackground();

            //
            if (CryptoFeed.CurrentPrices == null)
            {
                return(new ContentResult());
            }

            //
            return(new ContentResult()
            {
                Content = getContent(),
                ContentType = "text/html",
            });
        }