24 lines
546 B
C#
24 lines
546 B
C#
using System.Text.RegularExpressions;
|
|
|
|
namespace RhSolutions.MLModifiers.DrinkingWaterHeatingFittings;
|
|
|
|
public abstract class Adapter : DrinkingWaterHeatingFitting
|
|
{
|
|
public override bool TryQueryModify(string input, out string output)
|
|
{
|
|
output = string.Empty;
|
|
Match diameter = _diameter.Match(input);
|
|
if (!diameter.Success)
|
|
{
|
|
return false;
|
|
}
|
|
Match thread = _thread.Match(input);
|
|
if (!thread.Success)
|
|
{
|
|
return false;
|
|
}
|
|
output = $"{_title} {diameter.Groups["Diameter"]} {thread.Groups["Thread"]}";
|
|
return true;
|
|
}
|
|
}
|