summaryrefslogtreecommitdiff
path: root/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs
diff options
context:
space:
mode:
Diffstat (limited to 'RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs')
-rw-r--r--RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs19
1 files changed, 11 insertions, 8 deletions
diff --git a/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs b/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs
index ee20921..6450796 100644
--- a/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs
+++ b/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs
@@ -6,21 +6,24 @@ 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);
+
+ public override bool TryQueryModify(string input, out string output)
+ {
+ output = string.Empty;
+ var diameterMatch = _diameter.Match(input);
if (!diameterMatch.Success)
{
- return null;
+ return false;
}
- var threadMatch = _thread.Match(query);
+ var threadMatch = _thread.Match(input);
if (!threadMatch.Success)
{
- return null;
+ return false;
}
- var typeMatch = _type.Match(query);
+ var typeMatch = _type.Match(input);
string diameter = diameterMatch.Groups["Diameter"].Value;
string thread = threadMatch.Groups["Thread"].Value;
- return $"{_title} {(typeMatch.Success ? "длинный " : string.Empty)}{diameter}-Rp {thread}";
+ output = $"{_title} {(typeMatch.Success ? "длинный " : string.Empty)}{diameter}-Rp {thread}";
+ return true;
}
} \ No newline at end of file