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

23 lines
645 B
C#
Raw Normal View History

2024-02-08 17:11:11 +03:00
namespace RhSolutions.Parsers.Fittings;
2023-10-13 15:04:27 +03:00
2024-02-08 17:11:11 +03:00
[ParserKey("Угольник RAUTITAN")]
2023-12-30 14:43:25 +03:00
public class Elbow : DrinkingWaterHeatingFitting
2023-10-13 15:04:27 +03:00
{
2024-01-18 22:32:53 +03:00
protected override string _title { get; } = "Угольник -PLATINUM";
2023-10-22 13:43:18 +03:00
2024-02-08 17:11:11 +03:00
public override bool TryParse(string input, out string output)
2023-10-22 13:43:18 +03:00
{
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 15:04:27 +03:00
}