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

23 lines
571 B
C#

namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
public abstract class Eurocone : DrinkingWaterHeatingFitting
{
protected virtual Dictionary<string, string> _titles { get; } = new();
public override bool TryQueryModify(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;
}
}