Add IsRehauSku() method
This commit is contained in:
parent
c061564c27
commit
0288ae0a18
@ -48,7 +48,7 @@ namespace Rehau.Sku.Assist
|
|||||||
IProduct product = storeResponse
|
IProduct product = storeResponse
|
||||||
.Ecommerce
|
.Ecommerce
|
||||||
.Impressions
|
.Impressions
|
||||||
.Where(p => Regex.IsMatch(p.Id, @"\d{11}", RegexOptions.None))
|
.Where(p => p.Id.IsRehauSku())
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
return product;
|
return product;
|
||||||
@ -94,5 +94,12 @@ namespace Rehau.Sku.Assist
|
|||||||
return ExcelError.ExcelErrorValue;
|
return ExcelError.ExcelErrorValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsRehauSku(this string line)
|
||||||
|
{
|
||||||
|
return Regex.IsMatch(line, @"\d{11}") &&
|
||||||
|
line[0].Equals('1') &&
|
||||||
|
line[7].Equals('1');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user