Re: Is this a Windsor bug?

2014-09-17 Thread 'Michael' via Castle Project Users
Thanks all for your advice. Much appreciated. -- You received this message because you are subscribed to the Google Groups Castle Project Users group. To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-users+unsubscr...@googlegroups.com. To post

Is this a Windsor bug?

2014-09-16 Thread 'Michael' via Castle Project Users
From the documentation, it states: Transient lifestyle is a good choice when you want to be in control of instance's lifetime of the instances. When you need new instance, with new state every time. When I run the following test, though, it would seem this is not the case. If I run the

Re: Is this a Windsor bug?

2014-09-16 Thread Ken Egozi
the bug is in your test code. the 'i' variable is not captured in the thread's closure so all 10 threads gets i=10 (confirm by console.writeline(i) in the thread lambda) Ken Egozi. http://kenegozi.com/blog http://aspnetwebstack.codeplex.com http://www.windowsazure.com/en-us/develop/mobile/

Re: Is this a Windsor bug?

2014-09-16 Thread Ken Egozi
you can fix the test by adding this in the first row of the for loop var localI = i; and then change jp.ID=i; to jp.ID=localI; Ken Egozi. http://kenegozi.com/blog http://aspnetwebstack.codeplex.com http://www.windowsazure.com/en-us/develop/mobile/ http://www.shopyourway.com

Re: Is this a Windsor bug?

2014-09-16 Thread Sunny
Much easier test is to use Object.ReferenceEqual to compare the created instances. On Tue, Sep 16, 2014 at 11:15 AM, 'Michael' via Castle Project Users castle-project-users@googlegroups.com wrote: From the documentation, it states: Transient lifestyle is a good choice when you want to be in

Re: Instantiate ClassT, T with Windsor, Bug?

2009-10-17 Thread Gian Marco Gherardi
Sorry, i've seen your answer just now. Thanks for the patience. -- Gian Marco Gherardi On Thu, Oct 15, 2009 at 10:07 PM, Mauricio Scheffer mauricioschef...@gmail.com wrote: Hi Gian Marco, please be more careful, this is the third time you ask this question... I already answered the first