带回调的服务的城堡配置
这是我在 win 表单客户端中的城堡配置
<components>
<component id="TestServiceClient"
type="TcpService.ITestService, TcpService"
wcfEndpointConfiguration="TestServiceClient_endpoint"/>
</components>
问题是我如何设置我的配置来支持 DuplexClientModel? 我只能通过下面的代码来做到这一点。
DuplexClientModel model = new DuplexClientModel
{
Endpoint = WcfEndpoint.ForContract<ITestServiceWithCallback>()
.BoundTo(new NetTcpBinding())
.At("net.tcp://localhost/TestServiceWithCallback")
}.Callback(callbackService);
Here is my castle config in win forms client
<components>
<component id="TestServiceClient"
type="TcpService.ITestService, TcpService"
wcfEndpointConfiguration="TestServiceClient_endpoint"/>
</components>
The question is how can i setup my config to support DuplexClientModel?
I can do this only via code as below.
DuplexClientModel model = new DuplexClientModel
{
Endpoint = WcfEndpoint.ForContract<ITestServiceWithCallback>()
.BoundTo(new NetTcpBinding())
.At("net.tcp://localhost/TestServiceWithCallback")
}.Callback(callbackService);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论