Exemplo 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));
        }
Exemplo 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));
        }
Exemplo 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));
            }));
        }