【发布时间】:2011-11-27 07:08:32
【问题描述】:
我有一个服务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 声明,我无法取回结果。 这是怎么回事?
【问题讨论】:
标签: c# wcf asynchronous svcutil.exe out