예제 #1
0
 public void AddFilter(IActivityFilter filter)
 {
     Guard.ArgumentNotNull <IActivityFilter>(filter);
     if (this.head == null)
     {
         this.tail = filter;
         this.head = filter;
         return;
     }
     this.tail.Next = filter;
     this.tail      = filter;
 }
예제 #2
0
 public ActivityFilterDecision Decide(Activity activity)
 {
     Guard.ArgumentNotNull <Activity>(activity);
     for (IActivityFilter filter = this.head; filter != null; filter = filter.Next)
     {
         ActivityFilterDecision decision = filter.Decide(activity);
         if (decision != ActivityFilterDecision.Neutral)
         {
             return(decision);
         }
     }
     return(ActivityFilterDecision.Neutral);
 }