0
0
RhSolutions-Api/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ElbowModifier.cs
2023-10-13 15:04:27 +03:00

19 lines
671 B
C#

namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
public class ElbowModifier : DrinkingWaterHeatingFitting
{
protected override string _title { get; } = "Угольник RAUTITAN -PLATINUM";
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}";
}
}