예제 #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);
        }
예제 #2
0
        public IActionResult Get()
        {
            //
            CryptoFeed.EnsureBackground();

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

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