Override Autofac registration

Topics: Core, Writing modules
Jul 8, 2014 at 10:35 PM
Take a look at Config/HostComponents.config, probably you can do some earlier implementation swap there.
Jul 12, 2014 at 12:17 AM
So I wanted to say Host.config :-). You can register your module there, then it will be picked up early. Don't forget to add the module (if you do it in one) to the references of Orchard.Web then.

The problem with an ILocalizedStringManager (and similarly with a ctor-injectable ILogger implementation) is that these services need the full namespace of the type they are injected into, before they are instantiated (because this namespace is their context).
Jul 16, 2014 at 10:34 AM
Hmm, then I'm out of ideas. It seems that this is not easily possible then. You could open an issue about this, explaining the use-case and we'd then evaluate it.

Regarding the last sentence: localized strings use the namespace (or in case of templates, the path) as their context, i.e. they are tied to that context. This makes it possible to distinct between the same string used in multiple locations.

As for the the logger, Log4Net's philosophy is that it creates a separate logger object for each of the type logging is used in. This way the namespace of the using type is also included in the log message.