Castle Windsor WCF Facility host based only on a WCF service interface?
I have runtime provided WCF serrvice inteface :
[ServiceContract]
public interface IHelloService {
[OperationContract]
string SayHello(string message);
}
W开发者_如何学编程hat I'd like to do with my Windsor container (once for each provided service interface) :
container.Register(Component
.For(typeof(IHelloService))
.Interceptors(typeof(HelloServiceInterceptor)).First
.ActAs(new DefaultServiceModel()
.AddEndpoints(WcfEndpoint
.BoundTo(new BasicHttpBinding())
.At("http://localhost:6080/HelloService/")
)
)
);
As you see, no implementation would be provided.
And the interceptor :
class HelloServiceInterceptor: Castle.Core.Interceptor.IInterceptor {
public void Intercept(Castle.Core.Interceptor.IInvocation invocation)
{
// Do what I must to answer the call
}
}
Is that possible with Windsor WCF Facility "as is"?
Is there some way to achieve this with Windsor WCF Facility "as is"? Maybe I could provide a dummy implementation of the provided service interface, how would you do it?Please, don't ask why ;)
If I get an answer elsewhere, I'll let you know.
精彩评论