2

这是我在 win forms 客户端中的城堡配置

<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);
4

0 回答 0