0
0
RhSolutions-Api/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/Adapter.cs
2023-10-13 15:04:27 +03:00

22 lines
496 B
C#

using System.Text.RegularExpressions;
namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
public abstract class Adapter : DrinkingWaterHeatingFitting
{
protected override string? BuildRhSolutionsName(string query)
{
Match diameter = _diameter.Match(query);
if (!diameter.Success)
{
return null;
}
Match thread = _thread.Match(query);
if (!thread.Success)
{
return null;
}
return $"{_title} {diameter.Groups["Diameter"]} {thread.Groups["Thread"]}";
}
}