Are you getting an exception or an unexpected behavior?

On Thu, Oct 16, 2014 at 9:22 AM, Phil <[email protected]> wrote:
> Hi
>
> I would like to know if this scenario is supported by Windsor and if not, is
> there any workaround.
>
> Thanks
> Phil
>
>
> public Interface IMyFactory
> {
>    IServiceA Create(string secondLevelDependency);
> }
>
> public class ServiceA : IServiceA
> {
>    public ServiceA(IServiceB serviceB){...}
> }
>
> public class ServiceB : IServiceB
> {
>    public string SecondLevelDepdencency {get; private set;}
>    public ServiceB(string secondLevelDepdencency)
> {this.SecondLevelDepdencency = secondLevelDepdencency;}
> {
>
>
>
> [Test]
> public void ShouldPushSecondLevelDependencyParameters()
> {
>    kernel.Register(Component.For<IServiceB>().ImplementedBy<ServiceB>());
>    kernel.AddFacility<TypedFactoryFacility>();
>    kernel.Register(Component.For<IMyFactory>().AsFactory());
>
>    var factory = kernel.Resolve<IMyFactory>();
>
>    var service = factory.Create("value");
>    service.Should().NotBeNull();
>    service.SecondLevelDepdencency.Should().Be("value");
> }
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.



-- 
Cheers,
hammett
http://www.d-collab.com/
http://www.hammettblog.com/

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to