Open filiphajek opened 1 year ago
suggestion: With so many different convertors it is starting to get a bit crowded and occasionally confusing (e.g. why there is only 1 HexTo convertor while BytesTo has 3/ArrayTo has 5). The design could have been much simpler if you used some sort of "in between" type/format (e.g. byte) and had only 5 functions to convert user input (byte, int, hex ...) into the "in between" format and then another 5 functions to convert "in between" into the user specified "to" format. If there were 10 required formats your factory dictionary in CovertFactory class would have 100 values which is a bit absurd to maintain. With the "in between" format approach you would need just 20 functions to cover all conversions.
praise: Great use of design patterns (Validators, Convertors, ConvertorFactory). Makes the programmers intend much clearer.