示例#1
0
 public void ExecuteEventHandler()
 {
     BeginRequest?.Invoke(this, null);
     PostMapRequestHandler?.Invoke(this, null);
     AcquireRequestState?.Invoke(this, null);
     //Error?.Invoke(this, null);这个只有异常才调用,所以不需要在这里调用
 }
 protected void OnBeginRequest()
 {
     //默认写法
     //if (BeginRequest != null) BeginRequest(this, new EventArgs());
     //新写法
     BeginRequest?.Invoke(this, new EventArgs());
 }