blob: 3a33fce6f850663bcd2ff9bfe9f9a3f92c2b6749 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
using System.Text.RegularExpressions;
namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
public class ThreadElbowWallInternal : DrinkingWaterHeatingFitting
{
protected override string _title => "Угольник настенный внутр. резьба";
private Regex _type = new(@"([\b\W])(?<Type>длин)([\b\w\.\s])");
protected override string? BuildRhSolutionsName(string query)
{
var diameterMatch = _diameter.Match(query);
if (!diameterMatch.Success)
{
return null;
}
var threadMatch = _thread.Match(query);
if (!threadMatch.Success)
{
return null;
}
var typeMatch = _type.Match(query);
string diameter = diameterMatch.Groups["Diameter"].Value;
string thread = threadMatch.Groups["Thread"].Value;
return $"{_title} {(typeMatch.Success ? "длинный " : string.Empty)}{diameter}-Rp {thread}";
}
}
|