commandline
commandline copied to clipboard
Throw invalid operation exception if Dictionary type is used for specification
Hi Phani,
In my opinion the problem with this solution is that the error Non scalar properties should be sequence of type IEnumerable<T>. defined in TypeConverter.ChangeTypeSequence will be bypassed - that means that developers will receive a different error message when trying to parse a IEnumerable without a specified type.
In my opinion there are two possible solutions to the problem:
- To ensure - inside
ChangeTypeSequence- that the sequence has exactly one generic argument. - To add two new rules inside
SpecificationGuardsthat ensure that sequence types have exactly one generic argument.
Is it fair to have some checks inside the ChangeTypeSequence and some checks inside SpecificationGuards? Shouldn't we maybe try to move all checks to SpecificationGuards?
Thanks in advance and kind regards, Davide