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

26 lines
632 B
C#

using System.Text.RegularExpressions;
namespace RhSolutions.Parsers.Fittings;
[ParserKey("Коллектор HLV")]
public class ManifoldHLV : DrinkingWaterHeatingFitting
{ private static readonly Regex _portsCount =
new(@"\s(?<Ports>\d{1,2})\s");
protected override string _title => "Распределительный коллектор HLV";
public override bool TryParse(string input, out string output)
{
var match = _portsCount.Match(input);
if (match.Success)
{
output = $"{_title} на {match.Groups["Ports"]} групп";
return true;
}
else
{
output = string.Empty;
return false;
}
}
}