I would like to define a lifestyle (?) that allows me to do the following var c1 = IoC.Resolve<MyController>(); var c2 = IoC.Resolve<MyController>();
Assert.IsTrue(ReferenceEquals(c1.Dependency, c1.Child.Dependency)); Assert.IsTrue(ReferenceEquals(c2.Dependency, c2.Child.Dependency)); Assert.IsFalse(ReferenceEquals(c1.Dependency, c2.Dependency)); In other words, each instance of MyController should be injected with a new instance of Dependency; that each object within the MyController share the same instance of Dependency. Any ideas and how this could be acheived (I am expecting the answer will be create a custom ILifestyleManager - in that case I'm looking for some ideas of what the implementation would look like). Thanks in advance Christian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
