0
0
RhSolutions-Api/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/BendFormerSanitary.cs

19 lines
688 B
C#
Raw Normal View History

2023-10-13 22:11:59 +03:00
namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
public class BendFormerSanitary : DrinkingWaterHeatingFitting
{
protected override string _title => "Фиксатор поворота с кольцами";
protected override string? BuildRhSolutionsName(string query)
{
var diameterMatch = _diameter.Match(query);
if (!diameterMatch.Success)
{
return null;
}
string diameter = diameterMatch.Groups["Diameter"].Value;
var angleMatch = _angle.Match(query);
string angle = angleMatch.Success ? angleMatch.Groups["Angle"].Value : "90";
return $"{_title} {angle}° {diameter}";
}
}