Lifestyle transient does the same, there's no difference in behaviour sent from my HTC Desire
On 11/09/2010 11:18 PM, <[email protected]> wrote: Ah...ok I have to use...LifeStyle.Is( LifestyleType.Transient )...then it works. But it is a little confusing, that one could simply write ...LifeStyle.Transient and will get a different behaviour. Am 11.09.2010 14:52 schrieb Belvasis <[email protected]>: > Hi, > > I have a situation where i want to register an existing instance of a service with a spe... > pContainer.Register( Component.For().Instance(pS1).Named("sinst") ); > pContainer.Register( Component.For().ImplementedBy().LifeStyle.Transient ); > > > IService pS2 = pContainer.Resolve("sinst"); > IService pS3 = pContainer.Resolve(); > > Assert.AreEqual(pS1, pS2); > Assert.AreNotEqual(pS2, pS3); > > > This test fails... -- 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.
