0
0

Add black pipe Query Modifier

This commit is contained in:
Serghei Cebotari 2023-09-29 16:25:28 +03:00
parent 799b3f40a2
commit b369384931
2 changed files with 15 additions and 1 deletions

View File

@ -4,6 +4,18 @@ using Microsoft.AspNetCore.Http.Extensions;
namespace RhSolutions.Api.Services
{
public class BlackPipeQueryModifier : FlexPipeQueryModifier
{
protected override string diameterPattern => @"16|20|25";
protected override string pipeName => "Black";
protected override Dictionary<string, string> diameterNames => new()
{
["16"] = "16х2,2",
["20"] = "20х2,8",
["25"] = "25х3,5"
};
}
public class FlexPipeQueryModifier : IProductQueryModifier
{
protected virtual string diameterPattern { get; } = @"16|20|25|32|40|50|63";

View File

@ -14,6 +14,8 @@ public class ProductQueryModifierFactory
return new FlexPipeQueryModifier();
case "Stabil":
return new StabilPipeQueryModifier();
case "Black":
return new BlackPipeQueryModifier();
default:
return new BypassQueryModifier();
}