btcpayserver/BTCPayServer.Rating/Providers/NullRateProvider.cs

31 lines
758 B
C#
Raw Normal View History

2020-06-28 21:44:35 -05:00
using System;
using System.Threading;
2018-08-23 00:24:33 +09:00
using System.Threading.Tasks;
using BTCPayServer.Rating;
namespace BTCPayServer.Services.Rates
{
public class NullRateProvider : IRateProvider
{
private NullRateProvider()
{
}
private static readonly NullRateProvider _Instance = new NullRateProvider();
public static NullRateProvider Instance
{
get
{
return _Instance;
}
}
2023-04-10 11:07:03 +09:00
public RateSourceInfo RateSourceInfo => new RateSourceInfo("NULL", "NULL", "https://NULL.NULL");
public Task<PairRate[]> GetRatesAsync(CancellationToken cancellationToken)
2018-08-23 00:24:33 +09:00
{
return Task.FromResult(Array.Empty<PairRate>());
2018-08-23 00:24:33 +09:00
}
}
}