backgroundworker - How to have multiple singleton instance when user regenerate the data structure in application? -


i have application uses ground worker(bw) , tasks.

i have 1 singleton instance in app..which contains of common info instance of application. have different agents listed in app..and if switch different agent, i have build entire data structure (models/viewmodels/dtos)

lets say, agent "a" 1 of bw spawned...and uses above mentioned singleton instance...

soon switch agent "b"...so in app, create new data structure aganet "b". uses same singleton instance.

if change property in singleton instance...there chance new value used bw spawned agent "a".

can me overcome situation?

can have different singleton instance different agents ?

any appreciated. thanks

edit : different approach if can tell me great.

a singleton, definition, can exist once. if want different settings each user, need use different architecture. see http://sourcemaking.com/design_patterns/singleton more information singletons.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -