Re: Component creation as defined factory

2017-12-07 Thread Jonathon Rossi
> So be careful if you have dependencies like me. Windsor is not giving any
detailed info about registered but not initialized components. It seems
only collecting resolution conflicts and gaps. Any initialization or chain
based mistakes will be welcomed in a dark room :)

If you can could you put together a unit test for this scenario, we've
already got quite a few unit tests for unsatisfied dependencies so it would
be good to get this defect in error reporting fixed. A pull request with a
unit test would be great.

On Wed, Dec 6, 2017 at 2:46 AM Doruk Dalçam  wrote:

> After trying all the solutions nearly 8 hours I initialized all types and
> subtypes in the project. And change initialization order. Then I found
> there is a dependency JConnector of T so I registered all T's and
> initialized aaand voila!
>
> So be careful if you have dependencies like me. Windsor is not giving any
> detailed info about registered but not initialized components. It seems
> only collecting resolution conflicts and gaps. Any initialization or chain
> based mistakes will be welcomed in a dark room :)
>
> Have a nice day.
>
> --
> 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 castle-project-users+unsubscr...@googlegroups.com.
> To post to this group, send email to castle-project-users@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/castle-project-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 castle-project-users+unsubscr...@googlegroups.com.
To post to this group, send email to castle-project-users@googlegroups.com.
Visit this group at https://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/d/optout.


Re: Component creation as defined factory

2017-12-05 Thread Doruk Dalçam
After trying all the solutions nearly 8 hours I initialized all types and 
subtypes in the project. And change initialization order. Then I found 
there is a dependency JConnector of T so I registered all T's and 
initialized aaand voila! 

So be careful if you have dependencies like me. Windsor is not giving any 
detailed info about registered but not initialized components. It seems 
only collecting resolution conflicts and gaps. Any initialization or chain 
based mistakes will be welcomed in a dark room :) 

Have a nice day.

-- 
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 castle-project-users+unsubscr...@googlegroups.com.
To post to this group, send email to castle-project-users@googlegroups.com.
Visit this group at https://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/d/optout.


Re: Component creation as defined factory

2017-12-05 Thread Doruk Dalçam








> Here is the debugger view. 
> 
>
>

-- 
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 castle-project-users+unsubscr...@googlegroups.com.
To post to this group, send email to castle-project-users@googlegroups.com.
Visit this group at https://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/d/optout.


Re: Component creation as defined factory

2017-12-05 Thread Krzysztof Koźmic
Hi Doruk

You're right, I would expect more details there. If you can run that code
with a debugger attached, what do you see in the debugger view on the
container (
https://github.com/castleproject/Windsor/blob/master/docs/debugger-views.md)

On Wed, 6 Dec 2017 at 00:19 Doruk Dalçam  wrote:

> Hi, I have an component which is registered as
>
>
> container.Register(Component.For().AsFactory().LifestyleTransient());
>
> container.Register(Component.For(typeof(JConnector<>)).LifestyleTransient());
>
> And exception text is like this; (Normally I expect that exception message
> include necessary missing things. But this time no inner exception and no
> further info.)
>
> Can't create component 'JConnector<>' as it has dependencies to be
> satisfied.
>
>at
> Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext
> context, Boolean requiresDecommission, Boolean instanceRequired, Burden&
> burden)
>at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext
> context, Boolean instanceRequired)
>at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext
> context)
>at
> Castle.MicroKernel.Handlers.DefaultGenericHandler.Resolve(CreationContext
> context, Boolean instanceRequired)
>at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext
> context)
>at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler,
> Type service, IDictionary additionalArguments, IReleasePolicy policy)
>at
> Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type
> service, IDictionary arguments, IReleasePolicy policy)
>at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary
> arguments)
>at Castle.Windsor.WindsorContainer.Resolve[T]()
>at
> JawwalCrm.Bootstrapper.Common.WindsorServiceLocatorAdapter.Resolve[TService]()
> in WindsorServiceLocatorAdapter.cs:line 21
>
>
> Can you help me to resolve the issue? At least how to track it? Ideas or
> anything else would be great?
>
> --
> 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 castle-project-users+unsubscr...@googlegroups.com.
> To post to this group, send email to castle-project-users@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/castle-project-users.
> For more options, visit https://groups.google.com/d/optout.
>
-- 

sent from my phone
Krzysztof

-- 
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 castle-project-users+unsubscr...@googlegroups.com.
To post to this group, send email to castle-project-users@googlegroups.com.
Visit this group at https://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/d/optout.