aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerghei Cebotari <serghei@cebotari.ru>2024-05-19 16:22:16 +0300
committerSerghei Cebotari <serghei@cebotari.ru>2024-05-19 16:22:16 +0300
commit678bdb47b94293b53f463a785ada781248fd7148 (patch)
tree4c402a4c54093488c9a354adfc75c08278723a87
parent0292348f03025716b055e161923e12db23fe84ea (diff)
Bump ExcelDNA packages
-rw-r--r--RhSolutions.AddIn/AddIn/CurrencyFunctions.cs9
-rw-r--r--RhSolutions.AddIn/AddIn/RhSolutionsFunctions.cs14
-rw-r--r--RhSolutions.AddIn/RhSolutions.AddIn.csproj6
-rw-r--r--RhSolutions.Tests/RhSolutions.Tests.csproj2
4 files changed, 13 insertions, 18 deletions
diff --git a/RhSolutions.AddIn/AddIn/CurrencyFunctions.cs b/RhSolutions.AddIn/AddIn/CurrencyFunctions.cs
index 60c4ae0..510762b 100644
--- a/RhSolutions.AddIn/AddIn/CurrencyFunctions.cs
+++ b/RhSolutions.AddIn/AddIn/CurrencyFunctions.cs
@@ -1,6 +1,4 @@
-using ExcelDna.Registration.Utils;
-
-namespace RhSolutions.AddIn;
+namespace RhSolutions.AddIn;
public static class CurrencyFunctions
{
@@ -14,10 +12,9 @@ public static class CurrencyFunctions
var functionName = nameof(GetEuroCurrencyRate);
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);
- return requestResult ?? -1m;
+ var requestResult = await currencyClient.GetExchangeRate(date); return requestResult ?? -1m;
});
if (exchangeRate is not decimal)
diff --git a/RhSolutions.AddIn/AddIn/RhSolutionsFunctions.cs b/RhSolutions.AddIn/AddIn/RhSolutionsFunctions.cs
index a08f6f6..dfc3d6e 100644
--- a/RhSolutions.AddIn/AddIn/RhSolutionsFunctions.cs
+++ b/RhSolutions.AddIn/AddIn/RhSolutionsFunctions.cs
@@ -1,6 +1,4 @@
-using ExcelDna.Registration.Utils;
-
-namespace RhSolutions.AddIn;
+namespace RhSolutions.AddIn;
public static class RhSolutionsFunctions
{
@@ -14,7 +12,7 @@ public static class RhSolutionsFunctions
{
var functionName = nameof(ProductSearch);
var parameters = new object[] { query };
- if (AsyncTaskUtil.RunTask(functionName, parameters, async () =>
+ if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
{
return await databaseClient.GetProducts(query);
}) is not IEnumerable<Product> products)
@@ -52,7 +50,7 @@ public static class RhSolutionsFunctions
var article = skus.First().Id;
var functionName = nameof(GetProductName);
var parameters = new object[] { query };
- if (AsyncTaskUtil.RunTask(functionName, parameters, async () =>
+ if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
{
return await databaseClient.GetProducts(article);
}) is not IEnumerable<Product> requestResult)
@@ -81,7 +79,7 @@ public static class RhSolutionsFunctions
var functionName = nameof(GetProductPrice);
var parameters = new object[] { article };
- if (AsyncTaskUtil.RunTask(functionName, parameters, async () =>
+ if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
{
return await databaseClient.GetProducts(article);
}) is not IEnumerable<Product> requestResult)
@@ -113,7 +111,7 @@ public static class RhSolutionsFunctions
var functionName = nameof(GetProductPriceRub);
var parameters = new object[] { date };
- if (AsyncTaskUtil.RunTask(functionName, parameters, async () =>
+ if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
{
var requestResult = await currencyClient.GetExchangeRate(date);
return requestResult ?? -1m;
@@ -123,7 +121,7 @@ public static class RhSolutionsFunctions
}
parameters = new object[] { query };
- if (AsyncTaskUtil.RunTask(functionName, parameters, async () =>
+ if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
{
var products = await databaseClient.GetProducts(article);
var product = products.FirstOrDefault();
diff --git a/RhSolutions.AddIn/RhSolutions.AddIn.csproj b/RhSolutions.AddIn/RhSolutions.AddIn.csproj
index f967319..845db38 100644
--- a/RhSolutions.AddIn/RhSolutions.AddIn.csproj
+++ b/RhSolutions.AddIn/RhSolutions.AddIn.csproj
@@ -10,10 +10,10 @@
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="ExcelDna.AddIn" Version="1.7.0" />
- <PackageReference Include="ExcelDna.Integration" Version="1.7.0" />
+ <PackageReference Include="ExcelDna.AddIn" Version="1.8.0" />
+ <PackageReference Include="ExcelDna.Integration" Version="1.8.0" />
<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.HashCode" Version="1.1.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
diff --git a/RhSolutions.Tests/RhSolutions.Tests.csproj b/RhSolutions.Tests/RhSolutions.Tests.csproj
index 16d4897..643770e 100644
--- a/RhSolutions.Tests/RhSolutions.Tests.csproj
+++ b/RhSolutions.Tests/RhSolutions.Tests.csproj
@@ -10,7 +10,7 @@
<ItemGroup>
<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>