This is similar to This question but the answer doesn't solve my problem.
I want to register a default implementation for an interface in code but be able to override that in a config that is read BEFORE the code is run.
I want to do something like
if (!container.IsImplementationRegistered(typeof(TInterface))
{
container.RegisterType<TInterface, TImplementation>();
}
I can't use TryResolve as I will be registering several types in a row that might have dependencies of their own that aren't yet registered, leading to an erroneous override.
Will Unity 2.0 enable this or is there a way to do it in 1.2?