Registration is no big burden. For instance, registering all types
implementing ViewModelBase:

container.Register(
    AllTypes.Of<ViewModelBase>()
        .FromAssembly(Assembly.GetExecutingAssembly())
);


Check http://using.castleproject.org/display/IoC/Fluent+Registration+API for
examples, also check the unit tests for even more:
http://svn.castleproject.org:8080/svn/Castle/trunk/InversionOfControl/Castle.MicroKernel.Tests/Registration/

-- Roelof.

On Tue, Mar 24, 2009 at 12:39 AM, Ayende Rahien <[email protected]> wrote:

> Yes, you need to register anything that you resolve
>
>
> On Mon, Mar 23, 2009 at 5:47 PM, Adriano Machado <
> [email protected]> wrote:
>
>>
>> Do I need to register every component I'd like to resolve?
>>
>> The current scenario that I have is a Service that gives me instances
>> of ViewModels for my app. What I did was to declare the dependencies
>> of the view models, but not the VMs themselves.  But in ths case it is
>> not working. Castle cannot resolve my viewmodels.
>>
>> I was using Microsoft's Unity before, and it worked like a charm.  Now
>> that I'm migrating my app to the ALT.NET stack, Castle Windsor is not
>> up to my needs.  Is this the default behavior for Castle?  Or am I
>> doing something wrong?
>>
>> TIA.
>>
>>
>>
>
> >
>

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