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

23 lines
713 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace RhSolutions.Parsers.Fittings;
[ParserKey("Фиксатор поворота водоснабжение")]
public class BendFormerSanitary : DrinkingWaterHeatingFitting
{
protected override string _title => "Фиксатор поворота с кольцами";
public override bool TryParse(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;
}
}