28 lines
677 B
C#
28 lines
677 B
C#
namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
|
|
|
|
public class TPiece : DrinkingWaterHeatingFitting
|
|
{
|
|
protected override string _title => "Тройник RAUTITAN -PLATINUM";
|
|
|
|
public override bool TryQueryModify(string input, out string output)
|
|
{
|
|
output = string.Empty;
|
|
var diameters = _diameter.Matches(input)
|
|
.Select(match => match.Groups["Diameter"].Value)
|
|
.ToArray();
|
|
if (diameters.Length == 1)
|
|
{
|
|
output = $"{_title} {diameters[0]}-{diameters[0]}-{diameters[0]}";
|
|
}
|
|
else if (diameters.Length >= 3)
|
|
{
|
|
output = $"{_title} {diameters[0]}-{diameters[1]}-{diameters[2]}";
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
}
|