Пример #1
0
        public string GetCookieRun()
        {
            var channelFactory = new ChannelFactory <IFunnyQuoteService>("FunnyQuoteServiceWcf", _dicoveryAddressResolver.GetEndpointAddress("FunnyQuoteServiceWcf"));

            return(channelFactory.CreateChannel().GetQuoteAsync().Result);
        }
Пример #2
0
 public string GetCookieRun()
 {
     try
     {
         var channelFactory = new ChannelFactory <IFunnyQuoteService>("FunnyQuoteServiceWcf", _dicoveryAddressResolver.GetEndpointAddress("FunnyQuoteServiceWcf"));
         return(channelFactory.CreateChannel().GetQuoteAsync().Result);
     }
     catch (Exception e)
     {
         _logger.LogError(e, "Error connecting to backend service");
         throw;
     }
 }