You need different names

On Sun, Aug 29, 2010 at 9:49 AM, barroei <[email protected]> wrote:

> hello.
>
> i am trying to implement multiple Service Contracts via a single WCF.
>
> i am trying to run this code:
>
>  return new WindsorContainer()
>            .AddFacility<WcfFacility>()
>            .Register(
>                Component.For<IServiceBehavior>().Instance(metadata),
>                Component.For<IServiceBehavior>().Instance(debug),
>                Component
>                    .For<IBlogService>()
>                    .ImplementedBy<DefaultBlogService>()
>                    .Named("blogService")
>                    .LifeStyle.Transient
>                    .ActAs(new DefaultServiceModel().Hosted()
>                        .AddEndpoints(
>                            WcfEndpoint.BoundTo(new
> BasicHttpBinding()))),
>                Component
>                    .For<IBlogServiceAlternate>()
>                    .ImplementedBy<AlternateBlogService>()
>                    .Named("blogService")
>                    .LifeStyle.Transient
>                    .ActAs(new DefaultServiceModel().Hosted()
>                        .AddEndpoints(
>                            WcfEndpoint.BoundTo(new
> BasicHttpBinding()))),
>
>
>                Component
>                    .For<ILogger>()
>                    .ImplementedBy<DefaultLogger>()
>                    .LifeStyle.Transient
>            );
> but it tells me that the "blogservice" is already registered. i am
> loading 2 differant Interfaces which are implemented via differant
> classes. and i got stuck in this point.
>
> i cant use the :
>
> Component.For<IFirst,ISecond>()
>
> option since i need the ImplementBy to be
> <First,Second>
>
> meaning that IFirst will be implementedBy First
> and
> ISecond will be ImplementedBy Second
>
> --
> 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]<castle-project-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>
>

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