This project has moved and is read-only. For the latest updates, please go here.
7

Closed

Issue with SimpleIoc public void Unregister<TClass>(TClass instance)

description

The descrpition states that the Unregister instance method simply removes the instance and allows SimpleIoc to create a new instance of the class when it is called again. When unregistering, and trying to create a new instance, an exception occurs.

I've looked into the code and have found that during the Unregister procedure, the factory is also removed which prevents SimpleIoc from creating a new instance. After commenting this bit out, it works. Not sure if there are any further issues that could stem from commenting this out though...
Closed Feb 15, 2015 at 6:13 PM by lbugnion

comments

llewelynrex wrote May 8, 2014 at 5:22 PM

Issue seems to be contained in the "public void Unregister<TClass>(string key)" method as well.

lbugnion wrote Feb 6, 2015 at 9:46 AM

For more info on this issue and the (upcoming) fix, see https://mvvmlight.codeplex.com/discussions/483764

lbugnion wrote Feb 6, 2015 at 3:37 PM

Fixed in V5.1 (upcoming)

lbugnion wrote Feb 6, 2015 at 5:12 PM

DLLs are available here:
http://1drv.ms/1ylP1TS

Nuget will be updated ASAP.