WCF的异步服务编程,必须创建一个IAsyncResult的自定义实现:
应用==========>
服务端:
客户端:
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Client.ServiceReference;
- namespace Client
- {
- class Program
- {
- static void Main(string[] args)
- {
- GetDataClient proxy = new GetDataClient();
- string[] res = proxy.GetData();
- foreach (var item in res)
- {
- Console.WriteLine(item);
- }
- }
- }
- }
阅读(1643) | 评论(0) | 转发(0) |