Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How is SqlStringLocalizer turned into IStringLocalizer<SharedResource>? #63

Open
veimis opened this issue May 24, 2019 · 0 comments
Open

Comments

@veimis
Copy link

veimis commented May 24, 2019

The SqlStringLocalizerFactory.Create -method creates a new SqlStringLocalizer, which derives from IStringLocalizer.

The AboutController however expects a IStringLocalizer<SharedResource> and that is injected by the DI container, but how is the SqlStringLocalizer cast into IStringLocalizer<SharedResource> (as it does not derive from IStringLocalizer<T>)?

Suppose I'd like to create the SqlStringLocalizer manually (without the DI), would it be possible?
(And cast it to IStringLocalizer<SharedResource> so I can pass it along)

Thanks in advance,
Ilkka

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant