Beispiel #1
0
 //模板方法定义处理流程
 public void Excute(Responce responce)
 {
     if (weight >= responce.weight)
     {
         Call(responce.param);
     }
     else if (next != null)
     {
         next.Excute(responce);
     }
     else
     {
         Console.WriteLine("nobody responce");
     }
 }
Beispiel #2
0
 public void ExcuteResp(Responce responce)
 {
     // 返回权限最小节点,优先处理请求
     littleboy.Excute(responce);
 }