Register(AllTypes.FromAssemblyNamed("MyProjectWeb")
.BasedOn<ISingletonDependency>().WithService.FromInterface()
.BasedOn<ITransientDependency>().WithService.FromInterface()
)should be what you want On Thu, Jan 7, 2010 at 1:31 PM, Joe <[email protected]> wrote: > I am currently registering my components as such: > > container > .Register(AllTypes.Of(typeof(ISingletonDependency)) > .FromAssemblyNamed("MyProject.Web") > .WithService.FirstInterface()) > .Register(AllTypes.Of(typeof(ITransientDependency)) > .FromAssemblyNamed("MyProject.Web") > .WithService.FirstInterface() > .Configure(c => c.LifeStyle.Transient)); > > You can see all of my components inherit from a singleton or transient > marker interface. > > Is there a way to register different types of components and configure > them correctly while only making one pass thru the assembly? > > -- > 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]<castle-project-users%[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.
