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

22 lines
670 B
C#
Raw Normal View History

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