summaryrefslogtreecommitdiff
path: root/RhSolutions.Parsers/DrinkingWaterHeatingFittings/ManifoldG1.cs
diff options
context:
space:
mode:
Diffstat (limited to 'RhSolutions.Parsers/DrinkingWaterHeatingFittings/ManifoldG1.cs')
-rw-r--r--RhSolutions.Parsers/DrinkingWaterHeatingFittings/ManifoldG1.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/RhSolutions.Parsers/DrinkingWaterHeatingFittings/ManifoldG1.cs b/RhSolutions.Parsers/DrinkingWaterHeatingFittings/ManifoldG1.cs
new file mode 100644
index 0000000..2ac2cf1
--- /dev/null
+++ b/RhSolutions.Parsers/DrinkingWaterHeatingFittings/ManifoldG1.cs
@@ -0,0 +1,27 @@
+using System.Text.RegularExpressions;
+
+namespace RhSolutions.Parsers.Fittings;
+
+[ParserKey("Коллектор G1")]
+public class ManifoldG1 : DrinkingWaterHeatingFitting
+{
+ private static readonly Regex _portsCount =
+ new(@"\s(?<Ports>\d{1})\s");
+
+ protected override string _title => "Распределительный коллектор G1";
+
+ 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;
+ }
+ }
+}