45 lines
1.0 KiB
C#
45 lines
1.0 KiB
C#
namespace RhSolutions.Parsers.Pipes;
|
||
|
||
[ParserKey("Pink")]
|
||
public class PinkPipe : DrinkingWaterHeatingPipe
|
||
{
|
||
protected override string _title => "РЕХАУ PINK";
|
||
|
||
protected override Dictionary<string, string> _makeUp => new()
|
||
{
|
||
["бухт"] = "бухта",
|
||
["штанг"] = "прямые отрезки",
|
||
["отр"] = "прямые отрезки"
|
||
};
|
||
protected override Dictionary<int, string> _diameterNames => new()
|
||
{
|
||
[16] = "16х2,2",
|
||
[20] = "20х2,8",
|
||
[25] = "25х3,5",
|
||
[32] = "32х4,4",
|
||
[40] = "40х5,5",
|
||
[50] = "50х6,9",
|
||
[63] = "63х8,7"
|
||
};
|
||
|
||
public override bool TryParse(string input, out string output)
|
||
{
|
||
output = string.Empty;
|
||
var diameterMatch = _diameter.Match(input);
|
||
if (!diameterMatch.Success)
|
||
{
|
||
return false;
|
||
}
|
||
var diameter = int.Parse(diameterMatch.Groups["Diameter"].Value);
|
||
if (diameter < 40)
|
||
{
|
||
output = $"Труба {_title} {_diameterNames[diameter]}";
|
||
}
|
||
else
|
||
{
|
||
output = $"Труба pink+ {_diameterNames[diameter]}";
|
||
}
|
||
return true;
|
||
}
|
||
}
|