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

23 lines
571 B
C#
Raw Normal View History

2023-10-15 22:04:33 +03:00
namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
public abstract class Eurocone : DrinkingWaterHeatingFitting
{
protected virtual Dictionary<string, string> _titles { get; } = new();
2023-10-22 13:43:18 +03:00
public override bool TryQueryModify(string input, out string output)
2023-10-15 22:04:33 +03:00
{
2023-10-22 13:43:18 +03:00
output = string.Empty;
var diameterMatch = _diameter.Match(input);
2023-10-15 22:04:33 +03:00
if (diameterMatch.Success)
{
string diameter = diameterMatch.Groups["Diameter"].Value;
if (_titles.TryGetValue(diameter, out string? title))
{
2023-10-22 13:43:18 +03:00
output = title;
return true;
2023-10-15 22:04:33 +03:00
}
}
2023-10-22 13:43:18 +03:00
return false;
2023-10-15 22:04:33 +03:00
}
}