Just defer the registration.
You could also create some custom classes like
ComponentRegistrationProvider, BoostrapComponentRegistrationProvider,
FacilityRegistrationProvider, which implement
IEnumerable<IRegistration> or IEnumerable<IFacility> , and drop a
derived class in each assembly.
Then you do something like (pardon my linq, i've become obsessed with
it):
var bootstrap = (from assembly in assemblies
from type in assembly.GetTypes()
where typeof(BootstrapComponentRegistrationProvider).IsAssignableFrom
(type)
from registration in Activator.CreateInstance(type) as
IEnuermable<IRegistration>
select registration)
foreach (var registration in bootstrap)
Kernel.Register(registration)
On Mar 11, 11:16 am, Rui Silvestre <[email protected]> wrote:
> Hi,
> for what I understand the fluent API for windsor registers components
> directly in the kernel from the "fluent code" we write.
>
> Is it possible to have the fluent API add the components ONLY to the
> configuration store, instead of registering them immediately? This
> would allow me to merge different dll's, each adding its own
> components (boostrapping or not) and factories. The problem is the
> order of registration (boostrap > factories > components) gets
> corrupted because each dll would install its objects immediately, thus
> a factory in dll 2 would not catch, e.g., the ComponentModelCreated
> events from the components in dll 1.
>
> please correct me if I am wrong and if there is any other way to get
> this behavior..
>
> Thank all for this project...
>
> best,
>
> Rui Silvestre
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" 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-devel?hl=en
-~----------~----~----~----~------~----~------~--~---