summaryrefslogtreecommitdiff
path: root/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs
diff options
context:
space:
mode:
authorSerghei Cebotari <serghei@cebotari.ru>2023-10-13 22:35:48 +0300
committerSerghei Cebotari <serghei@cebotari.ru>2023-10-13 22:35:48 +0300
commit67c7546d5910c55eb38b9e341d6a09918ea4c525 (patch)
treea148c88e6934e6fdf8fefcd1f08b73300a30021f /RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs
parentf38dc2f199cb601a94e834c7dfe43fb0cadf9c8e (diff)
Add wall mounted thread elbows
Diffstat (limited to 'RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs')
-rw-r--r--RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs b/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs
new file mode 100644
index 0000000..3a33fce
--- /dev/null
+++ b/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs
@@ -0,0 +1,26 @@
+using System.Text.RegularExpressions;
+
+namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
+
+public class ThreadElbowWallInternal : DrinkingWaterHeatingFitting
+{
+ protected override string _title => "Угольник настенный внутр. резьба";
+ private Regex _type = new(@"([\b\W])(?<Type>длин)([\b\w\.\s])");
+ protected override string? BuildRhSolutionsName(string query)
+ {
+ var diameterMatch = _diameter.Match(query);
+ if (!diameterMatch.Success)
+ {
+ return null;
+ }
+ var threadMatch = _thread.Match(query);
+ if (!threadMatch.Success)
+ {
+ return null;
+ }
+ var typeMatch = _type.Match(query);
+ string diameter = diameterMatch.Groups["Diameter"].Value;
+ string thread = threadMatch.Groups["Thread"].Value;
+ return $"{_title} {(typeMatch.Success ? "длинный " : string.Empty)}{diameter}-Rp {thread}";
+ }
+} \ No newline at end of file