0
0
RhSolutions-Api/RhSolutions.MLModifiers/DrinkingWaterHeatingFittings/ManifoldHLV.cs
Serghei Cebotari d1ecc451d9
All checks were successful
Test API / test (push) Successful in 2m3s
Add HLV manifolds
2024-01-29 11:35:34 +03:00

26 lines
666 B
C#

using System.Text.RegularExpressions;
namespace RhSolutions.MLModifiers.DrinkingWaterHeatingFittings;
[MLModifierKey("Коллектор HLV")]
public class ManifoldHLV : DrinkingWaterHeatingFitting
{ private static readonly Regex _portsCount =
new(@"\b(?<Ports>\d{1,2})\b");
protected override string _title => "Распределительный коллектор HLV";
public override bool TryQueryModify(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;
}
}
}