我有一个服务 WCF 接口:
[ServiceContract(Namespace = "net.pipe://QFX_DLL/TradingService")]
public interface IGenericTradingInterface {
[OperationContract]
void GetServerInformation(out ServerAttributes attributes);
}
主机已启动并正常运行。我使用 svcutil 创建客户端代理对象,如下所示:
svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config net.pipe://localhost/QFX_DLL/mex /async /tcv:Version35
为异步调用生成的代理如下所示:
public void GetServerInformationAsync()
{
this.GetServerInformationAsync(null);
}
如您所见,out 参数属性完全丢失了!非异步方法看起来不错。有了这个 GetServerInformationAsync 声明,我无法取回结果。这里发生了什么?