异步调用WCF来用C#? [英] Async call to WCF with C#?

查看:119
本文介绍了异步调用WCF来用C#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#中,我怎么做一个异步调用一个WCF Web服务?我有一个服务引用设置来产生异步。我还修改了我的电话使用{WebServiceObject.Begin *()},但有两个参数末,'的AsyncCallback'和'对象asyncState。这些是什么,如何使用他们?

In C#, how do I make an async call to a WCF Web Service? I have a Service Reference set up to generate async. I also modified my calls to use { WebServiceObject.Begin* () } but there are two parameters at the end, 'AsyncCallback' and 'object asyncState'. What are these and how do I use them?

谢谢,

推荐答案

请参阅MSDN
这里; http://msdn.microsoft.com/en-us/library/system .asynccallback.aspx

在这里; http://msdn.microsoft.com/en-us/library/ms228969.aspx

在这里; http://msdn.microsoft.com/en-us/library/ms228975.aspx

在这里; http://msdn.microsoft.com/en-us/library/86wf6409.aspx

在Basicly开始*您设置一个回调,当操作已经完成了回调被调用。在那里,你呼叫结束*获取相应的数据。

Basicly in Begin* you set an callback, that callback is called when the operation has completed. There you call End* to retrieve the appropriate data.

这篇关于异步调用WCF来用C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆