24 lines
734 B
C#
24 lines
734 B
C#
|
namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
|
||
|
|
||
|
public class Coupling : DrinkingWaterHeatingFitting
|
||
|
{
|
||
|
protected override string _title => "Муфта соединительная";
|
||
|
protected override string? BuildRhSolutionsName(string query)
|
||
|
{
|
||
|
var diameters = _diameter.Matches(query);
|
||
|
if (diameters.Count == 0)
|
||
|
{
|
||
|
return null;
|
||
|
}
|
||
|
if (diameters.Count < 2 ||
|
||
|
diameters.Count > 1 && diameters[0].Groups["Diameter"].Value == diameters[1].Groups["Diameter"].Value)
|
||
|
{
|
||
|
return $"{_title} равнопроходная {diameters[0].Groups["Diameter"]}";
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
return $"{_title} переходная {diameters[0].Groups["Diameter"]}-{diameters[1].Groups["Diameter"]}";
|
||
|
}
|
||
|
}
|
||
|
}
|