First thank you for the great product and the hard work for maintaining and expanding it.
I'm doing my first steps with Catel and started with writing some unit tests.
So I registered a class as a singleton:
and confirmed that ResolveType<>() returns a reference to a singleton.
After that I decided to register the same class again, but this time as a transient object.
ServiceLocator.Instance.RegisterType<IMyClass, MyClass>(true, false);
I found that the SreviceLocator does'n preregister my class even with:
"registerIfAlreadyRegistered = true" parameter.
It sounds to me that "registerIfAlreadyRegistered = true" tells the container to override the previous instance, but it's not working like that.
A'm asking if there is a way to change lifetime status of already registered type (probably a bad idea since an instance of the class may be already bound) or
is there a way to unregister already registered type.
My questions are academical only since I don't need it in a production code.