summaryrefslogtreecommitdiff
path: root/RhSolutions.Parsers/DrinkingWaterHeatingFittings/ManifoldHLV.cs
blob: f4a4d483123313c6ed6d9a636b653078ce78996d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
		}
	}	
}