Method name fix
This commit is contained in:
parent
c96ac65990
commit
fd63d004f5
@ -14,7 +14,7 @@ public static class ExcelFunctions
|
|||||||
if (ExcelAsyncUtil.Run(nameof(ExchangeRate), dateField, delegate
|
if (ExcelAsyncUtil.Run(nameof(ExchangeRate), dateField, delegate
|
||||||
{
|
{
|
||||||
|
|
||||||
return currencyClient.GetCurrencyCourse(date)
|
return currencyClient.GetExchangeRate(date)
|
||||||
.GetAwaiter()
|
.GetAwaiter()
|
||||||
.GetResult() ?? -1m;
|
.GetResult() ?? -1m;
|
||||||
}) is not decimal requestResult)
|
}) is not decimal requestResult)
|
||||||
|
@ -14,7 +14,7 @@ public class CurrencyClient : ICurrencyClient
|
|||||||
_httpClient = httpClient;
|
_httpClient = httpClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<decimal?> GetCurrencyCourse(DateTime date)
|
public async Task<decimal?> GetExchangeRate(DateTime date)
|
||||||
{
|
{
|
||||||
string request = $"{_requestAddress}{date.Date:dd/MM/yyyy}";
|
string request = $"{_requestAddress}{date.Date:dd/MM/yyyy}";
|
||||||
|
|
||||||
|
@ -2,5 +2,5 @@ namespace ExcelAddIn.Services;
|
|||||||
|
|
||||||
public interface ICurrencyClient
|
public interface ICurrencyClient
|
||||||
{
|
{
|
||||||
public Task<decimal?> GetCurrencyCourse(DateTime date);
|
public Task<decimal?> GetExchangeRate(DateTime date);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user