As long as the module is in full control of registration and retrieval , I think you don't need to modify the IoC.
Let's say you currently register an object of type T, with key "Shell" in your module. If your module is aware that he needs to generate unique keys, it can register an object of type T, with key "Shell_1", where '1' could be a value retrieved using an instance counter (increment a private static variable in the constructor of the relevant class that is registering the object, using Interlocked class to ensure thead safety). Obviously, this means that every object using the container directly is responsible for generating a proper unique key, and every object that needs the registered object have to be able to compute the key properly.
If registrations/retrievals happen just at the initialization phase in your module, you could even use a simpler approach: create a static context variable, accessible by the IoC; modify IoC methods to take into account the context when retrieving registered items; push a context in a static variable before building up a module; clear the context when module has been initialized is done. Feasible, but I would avoid it, since it meddles with IoC in a dirty way... the previous one, instead, handles everything on the module side, and is definitely cleaner... at least in my opinion.
Let's say you currently register an object of type T, with key "Shell" in your module. If your module is aware that he needs to generate unique keys, it can register an object of type T, with key "Shell_1", where '1' could be a value retrieved using an instance counter (increment a private static variable in the constructor of the relevant class that is registering the object, using Interlocked class to ensure thead safety). Obviously, this means that every object using the container directly is responsible for generating a proper unique key, and every object that needs the registered object have to be able to compute the key properly.
If registrations/retrievals happen just at the initialization phase in your module, you could even use a simpler approach: create a static context variable, accessible by the IoC; modify IoC methods to take into account the context when retrieving registered items; push a context in a static variable before building up a module; clear the context when module has been initialized is done. Feasible, but I would avoid it, since it meddles with IoC in a dirty way... the previous one, instead, handles everything on the module side, and is definitely cleaner... at least in my opinion.