summaryrefslogtreecommitdiff
path: root/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/Adapter.cs
blob: 4074e972ee06334ab64edeee22dc70c188214f67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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"]}";
	}
}