Move parameters to field

This commit is contained in:
Sergey Chebotar 2023-04-06 21:37:21 +03:00
parent 8bcc8d34d4
commit 51c97607ef

View File

@ -1,8 +1,5 @@
#if !NET472 #if !NET472
using System.Runtime.Versioning; using System.Runtime.Versioning;
using RhSolutions;
using RhSolutions.Services;
using RhSolutions.Tools;
#endif #endif
namespace RhSolutions.Tools; namespace RhSolutions.Tools;
@ -12,6 +9,9 @@ namespace RhSolutions.Tools;
#endif #endif
public static class WorksheetExtensions public static class WorksheetExtensions
{ {
private static readonly Dictionary<string, string> pricelistParameters =
RhSolutionsAddIn.Configuration.GetPriceListHeaders();
public static bool IsValidSource(this Worksheet worksheet) public static bool IsValidSource(this Worksheet worksheet)
{ {
Range amountCell; Range amountCell;
@ -19,8 +19,6 @@ public static class WorksheetExtensions
Range programLineCell; Range programLineCell;
Range nameCell; Range nameCell;
var pricelistParameters = RhSolutionsAddIn.Configuration.GetPriceListHeaders();
Range[] cells = new[] Range[] cells = new[]
{ {
amountCell = worksheet.Cells.Find(pricelistParameters["Amount"]), amountCell = worksheet.Cells.Find(pricelistParameters["Amount"]),