Bump ExcelDNA packages
This commit is contained in:
parent
0292348f03
commit
678bdb47b9
@ -1,6 +1,4 @@
|
|||||||
using ExcelDna.Registration.Utils;
|
namespace RhSolutions.AddIn;
|
||||||
|
|
||||||
namespace RhSolutions.AddIn;
|
|
||||||
|
|
||||||
public static class CurrencyFunctions
|
public static class CurrencyFunctions
|
||||||
{
|
{
|
||||||
@ -14,10 +12,9 @@ public static class CurrencyFunctions
|
|||||||
var functionName = nameof(GetEuroCurrencyRate);
|
var functionName = nameof(GetEuroCurrencyRate);
|
||||||
var parameters = new object[] { date };
|
var parameters = new object[] { date };
|
||||||
|
|
||||||
var exchangeRate = AsyncTaskUtil.RunTask(functionName, parameters, async () =>
|
var exchangeRate = ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
|
||||||
{
|
{
|
||||||
var requestResult = await currencyClient.GetExchangeRate(date);
|
var requestResult = await currencyClient.GetExchangeRate(date); return requestResult ?? -1m;
|
||||||
return requestResult ?? -1m;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (exchangeRate is not decimal)
|
if (exchangeRate is not decimal)
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
using ExcelDna.Registration.Utils;
|
namespace RhSolutions.AddIn;
|
||||||
|
|
||||||
namespace RhSolutions.AddIn;
|
|
||||||
|
|
||||||
public static class RhSolutionsFunctions
|
public static class RhSolutionsFunctions
|
||||||
{
|
{
|
||||||
@ -14,7 +12,7 @@ public static class RhSolutionsFunctions
|
|||||||
{
|
{
|
||||||
var functionName = nameof(ProductSearch);
|
var functionName = nameof(ProductSearch);
|
||||||
var parameters = new object[] { query };
|
var parameters = new object[] { query };
|
||||||
if (AsyncTaskUtil.RunTask(functionName, parameters, async () =>
|
if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
|
||||||
{
|
{
|
||||||
return await databaseClient.GetProducts(query);
|
return await databaseClient.GetProducts(query);
|
||||||
}) is not IEnumerable<Product> products)
|
}) is not IEnumerable<Product> products)
|
||||||
@ -52,7 +50,7 @@ public static class RhSolutionsFunctions
|
|||||||
var article = skus.First().Id;
|
var article = skus.First().Id;
|
||||||
var functionName = nameof(GetProductName);
|
var functionName = nameof(GetProductName);
|
||||||
var parameters = new object[] { query };
|
var parameters = new object[] { query };
|
||||||
if (AsyncTaskUtil.RunTask(functionName, parameters, async () =>
|
if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
|
||||||
{
|
{
|
||||||
return await databaseClient.GetProducts(article);
|
return await databaseClient.GetProducts(article);
|
||||||
}) is not IEnumerable<Product> requestResult)
|
}) is not IEnumerable<Product> requestResult)
|
||||||
@ -81,7 +79,7 @@ public static class RhSolutionsFunctions
|
|||||||
var functionName = nameof(GetProductPrice);
|
var functionName = nameof(GetProductPrice);
|
||||||
var parameters = new object[] { article };
|
var parameters = new object[] { article };
|
||||||
|
|
||||||
if (AsyncTaskUtil.RunTask(functionName, parameters, async () =>
|
if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
|
||||||
{
|
{
|
||||||
return await databaseClient.GetProducts(article);
|
return await databaseClient.GetProducts(article);
|
||||||
}) is not IEnumerable<Product> requestResult)
|
}) is not IEnumerable<Product> requestResult)
|
||||||
@ -113,7 +111,7 @@ public static class RhSolutionsFunctions
|
|||||||
var functionName = nameof(GetProductPriceRub);
|
var functionName = nameof(GetProductPriceRub);
|
||||||
var parameters = new object[] { date };
|
var parameters = new object[] { date };
|
||||||
|
|
||||||
if (AsyncTaskUtil.RunTask(functionName, parameters, async () =>
|
if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
|
||||||
{
|
{
|
||||||
var requestResult = await currencyClient.GetExchangeRate(date);
|
var requestResult = await currencyClient.GetExchangeRate(date);
|
||||||
return requestResult ?? -1m;
|
return requestResult ?? -1m;
|
||||||
@ -123,7 +121,7 @@ public static class RhSolutionsFunctions
|
|||||||
}
|
}
|
||||||
|
|
||||||
parameters = new object[] { query };
|
parameters = new object[] { query };
|
||||||
if (AsyncTaskUtil.RunTask(functionName, parameters, async () =>
|
if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
|
||||||
{
|
{
|
||||||
var products = await databaseClient.GetProducts(article);
|
var products = await databaseClient.GetProducts(article);
|
||||||
var product = products.FirstOrDefault();
|
var product = products.FirstOrDefault();
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ExcelDna.AddIn" Version="1.7.0" />
|
<PackageReference Include="ExcelDna.AddIn" Version="1.8.0" />
|
||||||
<PackageReference Include="ExcelDna.Integration" Version="1.7.0" />
|
<PackageReference Include="ExcelDna.Integration" Version="1.8.0" />
|
||||||
<PackageReference Include="ExcelDna.Interop" Version="15.0.1" />
|
<PackageReference Include="ExcelDna.Interop" Version="15.0.1" />
|
||||||
<PackageReference Include="ExcelDna.Registration" Version="1.7.0" />
|
<PackageReference Include="ExcelDna.Registration" Version="1.8.0" />
|
||||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
|
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
|
||||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ExcelDna.Interop" Version="15.0.1" />
|
<PackageReference Include="ExcelDna.Interop" Version="15.0.1" />
|
||||||
<PackageReference Include="ExcelDna.Testing" Version="1.7.0" />
|
<PackageReference Include="ExcelDna.Testing" Version="1.8.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user