异步服务操作 [英] Asynchronous Service Operation

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

问题描述

我正在开发一个现有的Silverlight项目并使用大量的WCF。问题是我不知道开头的故事。假设我创建了一个WCF,然后向项目添加服务引用。我发现有很多代码,比如

 System.IAsyncResult BeginGetCurrentDateTime(System.AsyncCallback callback,object asyncState); 

我的问题是系统如何生成这些代码中的代码? silverlight
会自动  生成这些异步代码吗?


  

解决方案

您好HZ.USA,


如何添加您的WCF服务参考以及您添加此服务参考的项目?


我创建了一个示例WCF服务应用程序,然后将其添加到右键单击我的Silverlight应用程序 - >添加 - >服务参考。它将参考此服务,如下面的屏幕截图所示。我没有找到任何关于"System.IAsyncResult
BeginGetCurrentDateTime"的代码。在整个解决方案中。



请分享详细步骤,说明您如何操作以帮助我们重现此问题。


最好的问候,

Weiwei


I am working on an existing silverlight project and use a lot of WCF. The thing is that I don't know the story of the beginning. Say I create a WCF then add service reference to a project. I find that there are many code such as

System.IAsyncResult BeginGetCurrentDateTime(System.AsyncCallback callback, object asyncState);
        

My question is how the system generate these code underhood? Does the silverlight automatically generate these async code?

  

解决方案

Hi HZ.USA,

How do you add your WCF Service reference and what project do you add this service reference?

I create a sample WCF Service application and then add it into my Silverlight application by right-click -> Add -> Service Reference. It will reference this service as following screenshot shows. I don't find any code about "System.IAsyncResult BeginGetCurrentDateTime" in entire solution.

Please share the detailed steps that how do you operated to help us reproduce this issue.

Best Regards,
Weiwei


这篇关于异步服务操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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