Repository navigation
Cleanup GraphQL Localization - #17196
Conversation
|
I'm not sure if we should do this, after all the discussions about breaking changes lately. The Anyway, if we do it, the c'tors should be protected. P.S.: The PR description is misleading, why is it related to localization? |
|
Anyone project is able to inherit these classes. Now they have to provide the IStringLocalizer into the base constructor. The base constructor should accept any IStringLocalizer not only IStringLocalizer<>. This way the derived classes don't need to resolve the wrong Localizer to pass to the base class. It's abstract because these classes don't exist alone. They are base classes. Aren't they? Since I replaced IStringLocalizer<> with IStringLocalizer, this will cause an exception if someone added it to the IoC and tries to resolve it. |
gvkries
left a comment
There was a problem hiding this comment.
Oh, I added that parameter, I forgot about it. Than it's already a breaking change introduced by myself. We could either fix that or you can go ahead, I'm fine with whatever you want.
That is what this PR fixes. Do you see something else that I missed? |
My change is still a breaking one after this PR, because the parameter less c'tor is missing. I mean we can either make the string localizer optional with a default one so my change is not breaking anymore, or go ahead and formalize the actual intent of these classes being base classes. That's how I understand your change. Isn't that correct? |
No description provided.