Open jzabroski opened 5 years ago
What do you mean by
no ABC for DefaultTypeConverter.
ABC = Abstract Base Class. DefaultTypeConverter should be sealed, and it's methods should be pushed-up into an abstract DefaultTypeConverterBase. My guess is this is about 5 minutes of work, but it is a breaking change.
Ha, gotcha.
I've been trying to not make anything sealed and make everything virtual so people can override anything they want.
I'm not opposed to making a TypeConverterBase
class and doing your suggestion though.
The reason to make your default implementation sealed is so that your "core runtime" has a default implementation it can reference. The reason for creating an ABC above that is tooling. This way we have our cake and eat it too. I'll submit a PR for you to review; thanks for the general feedback that this is OK and not going to upset anything.
@JoshClose I'll submit a PR next week when I'm on vacation.
Is your feature request related to a problem? Please describe. When using ReSharper, I would like to type
.TypeConverter<ClassNotYetImplementedTypeConverter>();
and hit control+. and have it suggest implementingDefaultTypeConverterBase
instead ofITypeConverter
. Even if ReSharper does not support this refactoring, I think it is valid to implement only one side of the DefaultTypeConverter.Describe the solution you'd like
DefaultTypeConverter
sealed
, have it implementDefaultTypeConverterBase
DefaultTypeConverter
intoDefaultTypeConverterBase
Describe alternatives you've considered Add new faceted type converters API - a
FromTypeConverter
API andToTypeConverter
API.Additional context I logged a bug with JetBrains ReSharper here: https://youtrack.jetbrains.com/issue/RSRP-474706
However, it was in the course of logging the feature with JetBrains that I realized there was no ABC for DefaultTypeConverter.