0
0
RhSolutions-Api/RhSolutions.MLModifiers/DrinkingWaterHeatingFittings/ThreadElbowWallExternal.cs

27 lines
792 B
C#
Raw Normal View History

2024-01-26 15:50:41 +03:00
namespace RhSolutions.MLModifiers.DrinkingWaterHeatingFittings;
2023-10-13 22:35:48 +03:00
2024-01-26 15:50:41 +03:00
[MLModifierKey("Угольник настенный наружный")]
2023-10-13 22:35:48 +03:00
public class ThreadElbowWallExternal : DrinkingWaterHeatingFitting
{
protected override string _title => "Угольник настенный с наружной резьбой";
2023-10-22 13:43:18 +03:00
public override bool TryQueryModify(string input, out string output)
2023-10-13 22:35:48 +03:00
{
2023-10-22 13:43:18 +03:00
output = string.Empty;
var diameterMatch = _diameter.Match(input);
2023-10-13 22:35:48 +03:00
if (!diameterMatch.Success)
{
2023-10-22 13:43:18 +03:00
return false;
2023-10-13 22:35:48 +03:00
}
2023-10-22 13:43:18 +03:00
var threadMatch = _thread.Match(input);
2023-10-13 22:35:48 +03:00
if (!threadMatch.Success)
{
2023-10-22 13:43:18 +03:00
return false;
2023-10-13 22:35:48 +03:00
}
string diameter = diameterMatch.Groups["Diameter"].Value;
string thread = threadMatch.Groups["Thread"].Value;
2023-10-22 13:43:18 +03:00
output = $"{_title} {diameter}-R {thread}";
return true;
2023-10-13 22:35:48 +03:00
}
}