From b91d8fbe99ac56155e6b7547d2e4931832eeb9f4 Mon Sep 17 00:00:00 2001 From: Serghei Cebotari Date: Sun, 22 Oct 2023 13:43:18 +0300 Subject: Remove BuildRhSolutionsName methods --- .../ThreadElbowWallInternal.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs') 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у])(?длин)([\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 -- cgit v1.2.3