Пример #1
0
 /// <summary>
 /// Checks service is alive
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> IsAliveAsync(this IIcoExRateAPI operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.IsAliveWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 public void Dispose()
 {
     if (_service == null)
     {
         return;
     }
     _service.Dispose();
     _service = null;
 }
Пример #3
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='pair'>
 /// Possible values include: 'BTCUSD', 'ETHUSD'
 /// </param>
 /// <param name='dateTimeUtc'>
 /// </param>
 public static IList <RateResponse> ApiRatesByPairByDateTimeUtcGet(this IIcoExRateAPI operations, Pair pair, System.DateTime dateTimeUtc)
 {
     return(operations.ApiRatesByPairByDateTimeUtcGetAsync(pair, dateTimeUtc).GetAwaiter().GetResult());
 }
Пример #4
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='market'>
 /// Possible values include: 'Lykke', 'Kraken', 'Bitfinex'
 /// </param>
 /// <param name='pair'>
 /// Possible values include: 'BTCUSD', 'ETHUSD'
 /// </param>
 /// <param name='dateTimeUtc'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RateResponse> ApiRatesByMarketByPairByDateTimeUtcGetAsync(this IIcoExRateAPI operations, Market market, Pair pair, System.DateTime dateTimeUtc, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiRatesByMarketByPairByDateTimeUtcGetWithHttpMessagesAsync(market, pair, dateTimeUtc, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #5
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='market'>
 /// Possible values include: 'Lykke', 'Kraken', 'Bitfinex'
 /// </param>
 /// <param name='pair'>
 /// Possible values include: 'BTCUSD', 'ETHUSD'
 /// </param>
 /// <param name='dateTimeUtc'>
 /// </param>
 public static RateResponse ApiRatesByMarketByPairByDateTimeUtcGet(this IIcoExRateAPI operations, Market market, Pair pair, System.DateTime dateTimeUtc)
 {
     return(operations.ApiRatesByMarketByPairByDateTimeUtcGetAsync(market, pair, dateTimeUtc).GetAwaiter().GetResult());
 }
Пример #6
0
 /// <summary>
 /// Checks service is alive
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static object IsAlive(this IIcoExRateAPI operations)
 {
     return(operations.IsAliveAsync().GetAwaiter().GetResult());
 }
Пример #7
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='dateTimeUtc'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <AverageRateResponse> > ApiRatesByDateTimeUtcAverageGetAsync(this IIcoExRateAPI operations, System.DateTime dateTimeUtc, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiRatesByDateTimeUtcAverageGetWithHttpMessagesAsync(dateTimeUtc, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #8
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='dateTimeUtc'>
 /// </param>
 public static IList <AverageRateResponse> ApiRatesByDateTimeUtcAverageGet(this IIcoExRateAPI operations, System.DateTime dateTimeUtc)
 {
     return(operations.ApiRatesByDateTimeUtcAverageGetAsync(dateTimeUtc).GetAwaiter().GetResult());
 }
Пример #9
0
 public IcoExRateClient(string serviceUrl, ILog log)
 {
     _service = new IcoExRateAPI(new Uri(serviceUrl));
     _log     = log;
 }