0
0
RhSolutions-Api/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/Adapter.cs

24 lines
549 B
C#

using System.Text.RegularExpressions;
namespace RhSolutions.QueryModifiers.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;
}
}