Пример #1
0
 public ShortUrlReceive Receive()
 {
     try
     {
         string content = provider.Content();
         return(ShortUrlReceiveFactory.Create(content, provider.Url.AbsoluteUri, provider.Provider));
     }
     catch (WebException ex)
     {
         throw ex;
     }
 }
Пример #2
0
        public async Task <ShortUrlReceive> ReceiveAsync()
        {
            try
            {
                string content = await provider.ContentAsync();

                return(ShortUrlReceiveFactory.Create(content, provider.Url.AbsoluteUri, provider.Provider));
            }
            catch (WebException ex)
            {
                throw ex;
            }
        }