1
votes

I want to override windsor castle DI container default lifestyle from Singleton to Transient (I prefer safety over performance).

I downloaded the source code from github and I guess I can change some lines to acheive that, but i couldn't find how to do this.

1

1 Answers

1
votes

i ended up adding this line to the Register(IKernelInternal kernel) method:

if (componentModel.LifestyleType == LifestyleType.Undefined)
            componentModel.LifestyleType = LifestyleType.Transient;