I think container.Install(FromAssembly.InDirectory(new
AssemblyFilter("your_directory"))); looks much better.

On Mar 1, 6:17 pm, Xavier <[email protected]> wrote:
> I'm using Windsor in such a scenario
> - i'm filtering DLL in a specific folder based on their name
> - then load each assembly:
>
>                         foreach (var assembly in assemblies)
>                         {
>                                 try
>                                 {
>                                         _container.Register(
>                                                                 AllTypes
>                                                                 
> .FromAssembly(Assembly.LoadFile(assembly.FullName))
>                                                                 
> .BasedOn<IPlugin>()
>                                                                 );
>                                 }
>                                 catch (Exception e)
>                                 {
>                                         if(_log.IsErrorEnabled)
>                                                 _log.ErrorFormat(@"An error 
> has occured while loading assembly
> {0}\n{1}", assembly.FullName, e);
>                                 }
>                         }
>
> Regards
> Xavier

-- 
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.

Reply via email to