diff --git a/src/Models/SkuExtensions.cs b/src/Models/SkuExtensions.cs deleted file mode 100644 index 160dc16..0000000 --- a/src/Models/SkuExtensions.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Text.RegularExpressions; - -namespace RhSolutions.Models -{ - static class SkuExtensions - { - public static bool IsRehauSku(this string line) - { - return Regex.IsMatch(line, @"^[1]\d{6}[1]\d{3}$"); - } - } -} \ No newline at end of file diff --git a/src/Models/SourcePriceList.cs b/src/Models/SourcePriceList.cs index d210c10..ed860b4 100644 --- a/src/Models/SourcePriceList.cs +++ b/src/Models/SourcePriceList.cs @@ -87,7 +87,7 @@ namespace RhSolutions.Models if (group == null || name == null || sku == null) continue; - if (!sku.ToString().IsRehauSku()) + if (!Sku.TryParse(sku.ToString(), out _)) continue; Product p = new Product diff --git a/src/RhSolutions.csproj b/src/RhSolutions.csproj index d88943e..c46d489 100644 --- a/src/RhSolutions.csproj +++ b/src/RhSolutions.csproj @@ -83,7 +83,6 @@ -