SimonG96 / LightweightIocContainer

A lightweight IOC Container that is powerful enough to do all the things you need it to do.
MIT License
4 stars 2 forks source link

Add Multiton Lifestyle #3

Closed SimonG96 closed 5 years ago

SimonG96 commented 5 years ago

Add Lifestyle Multiton to Lifestyles.

SimonG96 commented 5 years ago

Add a possibility to clear the _multitons List in IocContainer?

SimonG96 commented 5 years ago

Add a possibility to clear the _multitons List in IocContainer?

Can't only clear the complete _multitons list, needs to clear for a given Type, and clear all instances of the given type.

Maybe use a new method in the factory?

SimonG96 commented 5 years ago

Maybe use a new method in the factory?

This is how it is done now. Method has to be named ClearMultitonInstance and has to be a generic method that expects one type:

void ClearMultitonInstance<T>();
SimonG96 commented 5 years ago

Maybe change it later, so that the name of the function doesn't have to be exactly this name.

SimonG96 commented 5 years ago

Testing multitons was successful, everything seems to work as expected.