i cant use different names.
its the same service.
i want it to have multiple interfaces.

meaning multiple servicecontracts on the same service.

i can easily do it if implement all interfaces by the same class.
but i want it to be generic and have an implementation class per each
interface

On Aug 29, 10:05 am, Ayende Rahien <[email protected]> wrote:
> 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%2bun­[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/castle-project-users?hl=en.- Hide quoted text 
> >-
>
> - Show quoted text -

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