public IGeoCircle Parse(IParserInput input) { var inputAsString = input.ReadAll(); var values = _doubleParser.ParseToArrayOrEmpty(inputAsString); switch (values.Length) { case 2: return(_factory.CreateCircle(values[0], values[1], _fallbackRadius)); case 3: return(_factory.CreateCircle(values[0], values[1], values[2])); default: throw new InvalidOperationException("expected two or 3 entries as input"); } }
public T Parse(IParserInput input) { var inputAsString = input.ReadAll(); return(_converter.Convert(inputAsString)); }