Hello Asım Turgut,
You can do as follows.
public IWindsorContainer BootstrapContainer()
{
return new WindsorContainer()
.Install(
Configuration.FromAppConfig(),
FromAssembly.This(),
*FromAssembly.Named("RepositoryLib") *
//perhaps pass other installers here if needed
);
}
On Mon, Apr 8, 2013 at 10:01 PM, Asım Turgut SOMUNCUOĞLU <
[email protected]> wrote:
> hi everybody,
>
> I work on desktop application and ı use 2 installer one of the name
> serviceInstaller the others name DomainInstaller. and ı have a 2 class
> library and one class my repository class library and the other class my
> service && my application class library.
>
> I want to register windsor container two installer but ı dont do anythink
> . please help me on this subject.
>
> I give u same code .
>
>
> public class ServiceInstaller : IWindsorInstaller
> {
> public void Install(IWindsorContainer container,
> IConfigurationStore store)
> {
>
> container.Register(
> Classes.FromThisAssembly()
>
> .Where(Component.IsInSameNamespaceAs<BranchService>())
> .WithService.DefaultInterfaces()
> .LifestyleTransient()
> );
> }
> }
>
>
> and repository Installer
> public class DomainInstaller : IWindsorInstaller
> {
> public void Install(IWindsorContainer container,
> IConfigurationStore store)
> {
>
> container.Register(
> Classes.FromThisAssembly()
>
> .Where(Component.IsInSameNamespaceAs<BranchRepository>())
> .WithService.DefaultInterfaces()
> .LifestyleTransient()
> );
> }
> }
>
>
>
> and my exe application constructure is here
>
> public LogInForm( )
> {
>
> container = BootstrapContainer();
>
> branchService = container.Resolve<IBranchService>();
>
> bool a = branchService.AddBranch("", "", 1);
>
> container.Dispose();
>
> InitializeComponent();
>
>
> SetBranchNameComboBox();
>
> }
>
> BootstrapContainer method is here
>
> public IWindsorContainer BootstrapContainer()
> {
> return new WindsorContainer()
>
> .Install(
> Configuration.FromAppConfig(),
> FromAssembly.This()
>
> //perhaps pass other installers here if needed
>
> );
> }
>
>
> I only install ServiceInstallar so use service method but ı want to use
> repositories method in service so ı must register
> DomainInstallar(ReposiyoryInstaller) but ı dont know how do make this...
>
> please help me
>
>
> thank you so much.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected]
> .
> Visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.