public IHttpHandler GetHandler(HttpContext context, string requestType, string url, string pathTranslated)
{
if (Roles.Length == 0)//如果角色属性没有的话,抛出异常
{ throw new Exception("初始化属性时失败!请联系 Ants"); }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
IHttpHandler handler = factory.GetHandler(context, requestType, url, pathTranslated);//获取当前的Hander
Execute(handler);//执行验证方法
return handler;//返回处理过后的Hander
}