diff options
author | Serghei Cebotari <serghei@cebotari.ru> | 2023-10-22 13:43:18 +0300 |
---|---|---|
committer | Serghei Cebotari <serghei@cebotari.ru> | 2023-10-22 13:43:18 +0300 |
commit | b91d8fbe99ac56155e6b7547d2e4931832eeb9f4 (patch) | |
tree | c3746de9b60d76870f8327387b04b765fb209375 /RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs | |
parent | 020922d749ab0f53fc178700e2181487be9a05ee (diff) |
Remove BuildRhSolutionsName methods
Diffstat (limited to 'RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs')
-rw-r--r-- | RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallInternal.cs | 19 |
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 |