Delete SkuExtensions class

This commit is contained in:
Sergey Chebotar 2022-12-23 21:20:41 +03:00
parent 0ccbf29382
commit 755d556f09
3 changed files with 1 additions and 14 deletions

View File

@ -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}$");
}
}
}

View File

@ -87,7 +87,7 @@ namespace RhSolutions.Models
if (group == null || name == null || sku == null) if (group == null || name == null || sku == null)
continue; continue;
if (!sku.ToString().IsRehauSku()) if (!Sku.TryParse(sku.ToString(), out _))
continue; continue;
Product p = new Product Product p = new Product

View File

@ -83,7 +83,6 @@
<Compile Include="Models\StatusbarBase.cs" /> <Compile Include="Models\StatusbarBase.cs" />
<Compile Include="Models\Dialog.cs" /> <Compile Include="Models\Dialog.cs" />
<Compile Include="Services\RegistryUtil.cs" /> <Compile Include="Services\RegistryUtil.cs" />
<Compile Include="Models\SkuExtensions.cs" />
<Compile Include="Models\ProgressBar.cs" /> <Compile Include="Models\ProgressBar.cs" />
<Compile Include="Models\ResultBar.cs" /> <Compile Include="Models\ResultBar.cs" />
<Compile Include="Controllers\CombineTool.cs" /> <Compile Include="Controllers\CombineTool.cs" />