标签:style blog http color io for
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace BZ.Web.QiYe.Handler
{
/// <summary>
/// Handler1 的摘要说明
/// </summary>
public class Handler1 : IHttpHandler
{
private delegate void task(); //定义任务委托
public void ProcessRequest(HttpContext context)
{
context.Response.Clear();
//委托事件
//任务数组
task[] tasks =
{
// Method();存放方法名
};
string sAction = (string)context.Request["action"];
foreach (task item in tasks)
{
if (item.Method.Name.Equals(sAction))
{
item.Invoke();
break;
}
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
通过定义任务委托的方法处理 action,布布扣,bubuko.com
标签:style blog http color io for
原文地址:http://www.cnblogs.com/banyan-rong/p/3854028.html