aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-04-06 21:37:21 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-04-06 21:37:21 +0300
commit51c97607efda75c404720da8b6dfc314e792b987 (patch)
treeaf8fbe24bd300aaaef6d1eacdd977749eaf89099
parent8bcc8d34d4a6953ccb3a668751383d9d0e397e92 (diff)
Move parameters to field
-rw-r--r--RhSolutions.AddIn/Tools/WorksheetExtensions.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/RhSolutions.AddIn/Tools/WorksheetExtensions.cs b/RhSolutions.AddIn/Tools/WorksheetExtensions.cs
index 0d4f9f3..29ab798 100644
--- a/RhSolutions.AddIn/Tools/WorksheetExtensions.cs
+++ b/RhSolutions.AddIn/Tools/WorksheetExtensions.cs
@@ -1,8 +1,5 @@
#if !NET472
using System.Runtime.Versioning;
-using RhSolutions;
-using RhSolutions.Services;
-using RhSolutions.Tools;
#endif
namespace RhSolutions.Tools;
@@ -12,6 +9,9 @@ namespace RhSolutions.Tools;
#endif
public static class WorksheetExtensions
{
+ private static readonly Dictionary<string, string> pricelistParameters =
+ RhSolutionsAddIn.Configuration.GetPriceListHeaders();
+
public static bool IsValidSource(this Worksheet worksheet)
{
Range amountCell;
@@ -19,8 +19,6 @@ public static class WorksheetExtensions
Range programLineCell;
Range nameCell;
- var pricelistParameters = RhSolutionsAddIn.Configuration.GetPriceListHeaders();
-
Range[] cells = new[]
{
amountCell = worksheet.Cells.Find(pricelistParameters["Amount"]),