0
0
RhSolutions-Api/RhSolutions.Parsers/DrinkingWaterHeatingFittings/Eurocone.cs

23 lines
538 B
C#

namespace RhSolutions.Parsers.Fittings;
public abstract class Eurocone : DrinkingWaterHeatingFitting
{
protected virtual Dictionary<string, string> _titles { get; } = new();
public override bool TryParse(string input, out string output)
{
output = string.Empty;
var diameterMatch = _diameter.Match(input);
if (diameterMatch.Success)
{
string diameter = diameterMatch.Groups["Diameter"].Value;
if (_titles.TryGetValue(diameter, out string? title))
{
output = title;
return true;
}
}
return false;
}
}