Using Fluent API on the client-side of a Remoting container

27 views
Skip to first unread message

Khash

unread,
Nov 29, 2010, 11:55:02 AM11/29/10
to Castle Project Users
On a client/server system, I am using the Fluent API to register
services on the server side and expose them with the remoting facility
like this:


container.Register(AllTypes
.FromAssemblyNamed("Assembly")
.Pick()
.If(t =>
(t.Name.EndsWith("Service")))
.WithService
.AllInterfaces()
.Configure(c =>

c.Named(c.ServiceType.FullName)
.AddAttributeDescriptor("remoteserver",
"component")));
This works absolutely fine.

On the client-side, I would like to do the same: Use the Fluent API to
register remote components. I have tried this:


container.Register(AllTypes
.FromAssemblyNamed("Assembly")
.Pick()
.WithService
.AllInterfaces()
.Configure(c => c
.Named(c.ServiceType.FullName)
.AddAttributeDescriptor("remoteclient",
"component")
.AddAttributeDescriptor("skipRemotingRegistration",
"false")));

But the client code calls the locally hosted service instead of the
remote one.

Is there a way to do this?
Reply all
Reply to author
Forward
0 new messages