Esempio n. 1
0
        public void ProcessRequest(HttpContext context)
        {
            var quoteService = new QuoteServiceClient("http://localhost:8087");
            var quote        = quoteService.GetQuote();

            context.Response.Write(String.Format("A quote from <b>{0}</b><br><h2>{1}</h2>", quote.Author, quote.QuoteText));
        }
Esempio n. 2
0
        public void ProcessRequest(HttpContext context)
        {
            var quoteService = new QuoteServiceClient("http://localhost:8087");
            var quote = quoteService.GetQuote();

            context.Response.Write(String.Format("A quote from <b>{0}</b><br><h2>{1}</h2>", quote.Author, quote.QuoteText));
        }
Esempio n. 3
0
        private Task ProcessRequestAsync(HttpContext context)
        {
            var quoteService = new QuoteServiceClient("http://localhost:8087");

            return(quoteService.GetQuoteAsync()
                   .ContinueWith(quoteTaks => {
                context.Response.Write(String.Format("A quote from <b>{0}</b><br><h2>{1}</h2>", quoteTaks.Result.Author, quoteTaks.Result.QuoteText));
            }));
        }