3
基本的に私はこのようなサービスを1つ登録できます。どのように私はすべてのサービスをcastle windsor wcf facilityに登録できますか
Container.Register(Component.For<IMyService>()
.AsWcfClient(new DefaultClientModel() {
Endpoint = WcfEndpoint
.BoundTo(new NetNamedPipeBinding())
.At("net.pipe://localhost/MyService") })
.LifeStyle.PerWebRequest);
しかし、すべてのサービスを同様の設定で登録する方法を理解できませんでした。
私は実行するために望んでいたものはこれです...
Container.Register(
AllTypes.FromAssemblyNamed("My.Server.MyContracts")
.Pick().If(x => x.Name.EndsWith("Service"))
.Configure(configurer => configurer.Named(configurer.Implementation.Name)
.AsWcfClient(new DefaultClientModel
{
Endpoint = WcfEndpoint.BoundTo(new NetNamedPipeBinding())
.At(string.Format("net.pipe://localhost/{0}", configurer.Named(configurer.Implementation.Name)).Substring(1))
}))
.LifestylePerWebRequest()
);
がどのように私は、WCFクライアントとして、すべてのサービスを登録することができますか?ウィンザー3.0を使用して