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

22 lines
496 B
C#
Raw Normal View History

2023-10-13 15:04:27 +03:00
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"]}";
}
}