- APM 异步编程模型,Asynchronous Programming Model
- EAP 基于事件的异步编程模式,Event-based Asynchronous Pattern
- TAP 基于任务的异步编程模式,Task-based Asynchronous Pattern
APM(早期的异步编程模型)
该编程模型使用BeginXXX,EndXXX方法和IAsyncResult接口
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes; namespace AsyncProgramTest
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public class RequestState
{
// This class stores the State of the request.
const int BUFFER_SIZE = 1024;
public StringBuilder requestData;
public byte[] BufferRead;
public HttpWebRequest request;
public HttpWebResponse response;
public Stream streamResponse;
public RequestState()
{
BufferRead = new byte[BUFFER_SIZE];
requestData = new StringBuilder("");
request = null;
streamResponse = null;
}
}
public MainWindow()
{
InitializeComponent(); }
const int BUFFER_SIZE = 1024;
private void button_Click(object sender, RoutedEventArgs e)
{
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create("http://www.cnblogs.com/"); RequestState myRequestState = new RequestState();
myRequestState.request = myHttpWebRequest;
IAsyncResult result =(IAsyncResult)myHttpWebRequest.BeginGetResponse(new AsyncCallback(RespCallback), myRequestState); }
private void RespCallback(IAsyncResult asynchronousResult)
{
RequestState myRequestState = (RequestState)asynchronousResult.AsyncState;
HttpWebRequest myHttpWebRequest = myRequestState.request;
myRequestState.response = (HttpWebResponse)myHttpWebRequest.EndGetResponse(asynchronousResult); // Read the response into a Stream object.
Stream responseStream = myRequestState.response.GetResponseStream();
myRequestState.streamResponse = responseStream; // Begin the Reading of the contents of the HTML page and print it to the console.
IAsyncResult asynchronousInputRead = responseStream.BeginRead(myRequestState.BufferRead, 0, BUFFER_SIZE, new AsyncCallback(ReadCallBack), myRequestState);
return; }
private static void ReadCallBack(IAsyncResult asyncResult)
{
RequestState myRequestState = (RequestState)asyncResult.AsyncState;
Stream responseStream = myRequestState.streamResponse;
int read = responseStream.EndRead(asyncResult);
// Read the HTML page and then print it to the console.
if (read > 0)
{
myRequestState.requestData.Append(Encoding.UTF8.GetString(myRequestState.BufferRead, 0, read));
IAsyncResult asynchronousResult = responseStream.BeginRead(myRequestState.BufferRead, 0, BUFFER_SIZE, new AsyncCallback(ReadCallBack), myRequestState);
return;
}
else
{
Console.WriteLine("\nThe contents of the Html page are : ");
if (myRequestState.requestData.Length > 1)
{
string stringContent;
stringContent = myRequestState.requestData.ToString();
Console.WriteLine(stringContent);
}
Console.WriteLine("Press any key to continue..........");
Console.ReadLine(); responseStream.Close();
}
}
}
}
EAP(基于事件的异步编程模式)
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2cAAAE0CAIAAAAnrNxCAAAgAElEQVR4nO3dPW7rvp7GcW3iriItd3C3kB2wvwvwHlikuMUpUqU7TYABGODiBAGmCoxTTJXC+l9kgJSTg0EwG+AUeuPLj6JsKwltfz8wcE4USaRoy3xCSnbjAAAAgJLmuysAAACAE0BqBAAAQBmpEQAAAGWkRgAAAJSRGgEAAFD2ialRN84mC612TeOaxunod61T6cLvtaxK2SNa5sjNP8v7y/XN/Wb3VZu/v1zfbJ8OLW1lJ115AAA+zVenxo5RdaVGoT5uvyrJeziyAivaba9uHm/fnXPLUtGCdZ4ewhV226uHt+WbJ8V9afA66coDAPAtqkmN3+r4+lSeGl+fH6/vHq+fP5xzr8/bzUP//2M8PdwHO/GD176+IzWebuUBAPgWe6dG3Thj+klVZaaFfeZpnRr+rxtnbbxmJwpJuVnacXmTD6C5Kvnbjru12mnjlLfP1kyrdQ/TZqsk7lM8opzcEeUaJCionWo+tae4MPH6/Hj9/Hb78PLqPm6f316f+9T49HB/ddM/xtG1caE33va2udnePj92y4f0+SgGr4WbO9eP6g0VGIKXt3Czc8593N4l44J3L6+zrdw0zfzTUW/lAQC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k9q5LJGAACAelWRGvlGQQAAgMpVkRoBAABQOVIjAAAAykiNAAAAKCM1AgAAoGzv1MidKwAAABfosLFGPiUHAADgshw4Q80ncgMAAFwUUiMAAADKDk+NTFEDAABcjsPvoW6NaoiOAAAAl4GxRgAAAJRxXSMAAADKSI0AAAAoIzUCAACgjE/5BgAAQBnfKAgAAICywz95BwAAAJeD1AgAAIAyUiMAAADKSI0AAAAoIzUCAACgjNQIAACAMlIjAAAAykiNAAAAKPt/sSWT5LNHToQAAAAASUVORK5CYII=" alt="" />
TAP(基于任务的异步编程模式)
private async void button_Click(object sender, RoutedEventArgs e)
{
System.Net.Http.HttpClient httpClient = new System.Net.Http.HttpClient();
var msg = await httpClient.GetAsync("http://www.cnblogs.com/");
var htmlString=await msg.Content.ReadAsStringAsync();
//todo process htmlstring
}
EAP=>TAP(基于事件的异步编程模式转化为基于任务的异步编程模式)
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA5IAAAIwCAIAAAB7sMMUAAAgAElEQVR4nO3du2okQZvm8byJ7yrkjBF3MLegzxpYJ/y5gLLE+GHImIY2ZIlvjNaCYCEFg4TEWELIGEcylD1oQF6PmqFZWNZYI9bIUxzeyEOdI/X/UdCtrDxEZlUpHr0ZWVnYyN/+9rd4Yq3URVEUhS5TMwAAAAC7UMSTkrG1MorECgAAgEOYE1tLXShT7bY9AAAAgIDYCgAAgAzMjK2MEQAAAMAhTIytpeZKLAAAABzOjGorV2QBAADgUBjbCgAAgAwQWwEAAJABYisAAAAywO0GAAAAkIE5sbUOrnylAAAAAPZuXmwFAAAADoLYCgAAgAwQWwEAAJABYisAAAAyIMTWA/j18O3s6mXtiQAAAFi6wlr7t7T9NOLXw7dvD7/WnggAAIDFa2Kr+Ny+YuvL1VmcRadPlB15WZb8DQAAMMsRxNaXKyFfTp+YWKWXb389fDtrtJOddbUJ99fDt28PD1dnZ2fNP2dXL/LEZhOtrlEvV2dXD922mnU6LfF+ChsJAACAtIPH1q0PEBDSoBR35dh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AABgSYitAAAAyACxFQAAABlYZGxlaCsAAMDSLC22cnNXAACARZJja2f/DQIAAABiS6u2AgAAYJGIrQAAAMgAsRUAAAAZILYCAAAgA8RWAAAAZIDYCgAAgAwQWwEAAJABYisAAAAyQGwFAABABoitAAAAyACxFQAAABkgtgIAACADxFYAAABkgNgKAACADBBbAQAAkAFiKwAAADJAbAUAAEAGiK0AAADIALEVAAAAGVhgbP15+/37j+ffM5b4/fzj+/fv329/7qxNAAAA2MzCYuvv5x/fb5+ff8yKrb9nzg8AAIC9W1hstdZKMfT384/b29u2oNoUV5sff946P/hPDS/oPOuUar3VxYsAAABgLV8mtnax8ffzjz5i/nj+7cwvPjW84PduyR/Pv639eevF03gRAAAArOXLxNZuSlcOdUus9bMDT409W6fScMvxIgAAAFjLl4ytQX50Y2vqqbFnm2JqME+8CAAAANaysNjaDyX1vk3AD7JODdQfJDD41NiCzf+Csa3hIgAAAFjLwmIrAAAAlonYCgAAgAwQWwEAAJABYisAAAAyQGwFAABABoitAAAAyIAQW7+QyqrC6vLQzRg10M7KqsJuYw9KXUw9EqUuauEClVHxxBwk92iuyqgtHoAjO55bO0oi6dCNvin1wJs/l0+33fbbBttzf3N9cn59cn69ettsRZ+vp+dP99tpVL22jZu0PVs7SqLtHrosVEYpUx26FUersNb+Le3QzduxzTo2o/bVKa4bW8NefygFJJ/rwkpRuJ8kqafdKGZN67qd1mw7Pm0jO7jrqIwSWjpnK5vF1sQLt6GJ7Z9/MKMlpqxiR7F1fx/t2q5jq/xWnLf8NttXaudNObryaVt/e6qT08n59cmWU86fi8utxtbP19OuqTcf62xls9japcyT87uLzzVXEpnY/vkH0zl0Tsu3+ConmvT2dHJ+ffr4ZzsbmanUx1SxODJNbBWfW35s3cy++zbRWGz1Asvs2DqQm7be006OrW53t80mbDW2VkbJYXE/hbXd1Wn3FVunrWAotm5gUbE1+Vact4otx1al2nrS9mLr5eu7tdba98e7rSbXrcbWz9dTOSxuYyvj/lxcull5y2veQ2zdwSGSm3R/c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MMLYVAAAAGSC2AgAAIAPEVgAAAGSA2w0AAAAgA9zcFQAAABmQY2tn/w0CAAAAYkJsBQAAAI4NsRUAAAAZILYCAAAgA8RWAAAAZIDYCgAAgAwQWwEAAJABYisAAAAyQGwFAABABoitAAAAyACxFQAAABkgtgIAACADxFYAAABkgNgKAACADBBbAQAAkAFiKwAAADLw/wFWJMZUItDlywAAAABJRU5ErkJggg==" alt="" />
APM=>TAP(BeginXXX转化为基于任务的异步编程模型)
private async void button_Click(object sender, RoutedEventArgs e)
{
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create("http://www.cnblogs.com/"); var maskTask = Task.Factory.FromAsync<WebResponse>(myHttpWebRequest.BeginGetResponse,myHttpWebRequest.EndGetResponse, null, TaskCreationOptions.None);
WebResponse webResponse = await maskTask;
Stream responseStream = webResponse.GetResponseStream(); using (StreamReader reader = new StreamReader(responseStream))
{
var htmlString =await reader.ReadToEndAsync(); Console.WriteLine(htmlString);
//to do process html String }
}
参考文章:http://www.dotblogs.com.tw/yc421206/archive/2013/08/06/113555.aspx