Esempio n. 1
0
        public TestBase()
        {
            var client = new DXNewsAPI();

            client.BaseUri = new Uri("http://dxnews.azurewebsites.net/");
            Client         = client;
        }
Esempio n. 2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task <System.Collections.Generic.IList <NewsItem> > GetNewsAsync(this IDXNewsAPI operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.GetNewsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 3
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static System.Collections.Generic.IList <NewsItem> GetNews(this IDXNewsAPI operations)
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IDXNewsAPI)s).GetNewsAsync(), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }