Where/BasedOn/Peek are logical ORs in this context, not ANDs that's explained in the doco.
On 14/08/2011 12:09 PM, Shawn Hinsey wrote:
So to be clear, using Where precludes the use of the other calls? 2011/8/13 Krzysztof Koźmic<[email protected]>:That's because this core is equivalent to the following: Container.Register (AllTypes.FromAssembly(myAssembly) .Where(Component.IsInNamespace(myDesiredNamespace))); Container.Register (AllTypes.FromAssembly(myAssembly) .BasedOn(typeof (MyServiceInterface)) .Configure(component => component.LifeStyle.Transient) .WithService.AllInterfaces().WithService.Self()); This is a very common problem with the API and WIndsor 3 deprecates this option (you will get a compiler warning). On 14/08/2011 11:55 AM, Shawn Hinsey wrote:Hello, I have the following registration call. Container.Register (AllTypes.FromAssembly(myAssembly) .Where(Component.IsInNamespace(myDesiredNamespace)) .BasedOn(typeof (MyServiceInterface)) .Configure(component => component.LifeStyle.Transient) .WithService.AllInterfaces().WithService.Self()); But after this call, the container reports the lifestyle all of all of these instances as undefined and defaulted to singleton, which is causing problems due to their dependencies on transient components. I am confident that this should work, based on the documentation and my experience with Windsor, so am I overlooking here? Thanks, Shawn-- 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.
-- 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.
